mayutils 1.2.5__tar.gz → 1.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. {mayutils-1.2.5 → mayutils-1.2.6}/PKG-INFO +1 -1
  2. {mayutils-1.2.5 → mayutils-1.2.6}/pyproject.toml +1 -1
  3. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/datetime.py +41 -1
  4. {mayutils-1.2.5 → mayutils-1.2.6}/LICENSE +0 -0
  5. {mayutils-1.2.5 → mayutils-1.2.6}/README.md +0 -0
  6. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/__init__.py +0 -0
  7. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/core/__init__.py +0 -0
  8. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/core/constants.py +0 -0
  9. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/data/__init__.py +0 -0
  10. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/data/analysis/__init__.py +0 -0
  11. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/data/cache/.gitkeep +0 -0
  12. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/data/live.py +0 -0
  13. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/data/local.py +0 -0
  14. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/data/queries/.gitkeep +0 -0
  15. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/data/queries/__init__.py +0 -0
  16. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/data/queries/examples/.gitkeep +0 -0
  17. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/data/read.py +0 -0
  18. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/environment/__init__.py +0 -0
  19. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/environment/benchmarking.py +0 -0
  20. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/environment/databases.py +0 -0
  21. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/environment/filesystem.py +0 -0
  22. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/environment/logging.py +0 -0
  23. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/environment/memoisation.py +0 -0
  24. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/environment/oauth.py +0 -0
  25. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/environment/webdrivers.py +0 -0
  26. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/export/__init__.py +0 -0
  27. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/export/images.py +0 -0
  28. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/export/pdf.py +0 -0
  29. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/export/slides.py +0 -0
  30. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/interfaces/__init__.py +0 -0
  31. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/interfaces/google.py +0 -0
  32. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/interfaces/microsoft.py +0 -0
  33. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/interfaces/streamlit.py +0 -0
  34. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/mathematics/__init__.py +0 -0
  35. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/mathematics/numba.py +0 -0
  36. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/mathematics/numpy.py +0 -0
  37. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/__init__.py +0 -0
  38. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/classes.py +0 -0
  39. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/colours.py +0 -0
  40. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/dataframes.py +0 -0
  41. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/decorators.py +0 -0
  42. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/dictionaries.py +0 -0
  43. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/functions.py +0 -0
  44. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/hashing.py +0 -0
  45. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/numbers.py +0 -0
  46. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/strings.py +0 -0
  47. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/objects/types.py +0 -0
  48. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/scripts/__init__.py +0 -0
  49. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/scripts/clear_cache.py +0 -0
  50. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/scripts/versioning.py +0 -0
  51. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/testing/__init__.py +0 -0
  52. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/__init__.py +0 -0
  53. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/console.py +0 -0
  54. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/graphs/__init__.py +0 -0
  55. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/graphs/combine.py +0 -0
  56. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/graphs/matplotlib/__init__.py +0 -0
  57. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/graphs/matplotlib/template.py +0 -0
  58. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/graphs/plotly/__init__.py +0 -0
  59. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/graphs/plotly/charts.py +0 -0
  60. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/graphs/plotly/templates.py +0 -0
  61. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/graphs/plotly/traces.py +0 -0
  62. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/graphs/plotly/utilities.py +0 -0
  63. {mayutils-1.2.5 → mayutils-1.2.6}/src/mayutils/visualisation/notebook.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: mayutils
3
- Version: 1.2.5
3
+ Version: 1.2.6
4
4
  Summary: Utilities for Python from Mayuran Visakan
5
5
  Author: Mayuran Visakan
6
6
  Author-email: Mayuran Visakan <mayuran.k.v@gmail.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "mayutils"
3
- version = "1.2.5"
3
+ version = "1.2.6"
4
4
  description = "Utilities for Python from Mayuran Visakan"
5
5
  authors = [
6
6
  { name = "Mayuran Visakan", email = "mayuran.k.v@gmail.com" }
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
  from contextlib import _GeneratorContextManager
3
3
  from sqlite3 import register_adapter
4
- from typing import Any, Optional, Self, Literal
4
+ from typing import Any, Iterator, Optional, Self, Literal, overload
5
5
  import datetime as _datetime
6
6
  import numpy as np
7
7
  from pendulum import (
@@ -515,6 +515,46 @@ class Intervals(object):
515
515
 
516
516
  return self
517
517
 
518
+ def __repr__(
519
+ self,
520
+ ) -> str:
521
+ return f"Intervals(\n\t{'\n\t'.join([repr(interval) for interval in self.intervals])}\n)"
522
+
523
+ def __iter__(
524
+ self,
525
+ ) -> Iterator[Interval]:
526
+ return iter(self.intervals)
527
+
528
+ def __len__(
529
+ self,
530
+ ) -> int:
531
+ return len(self.intervals)
532
+
533
+ @overload
534
+ def __getitem__(
535
+ self,
536
+ key: int,
537
+ ) -> Interval: ...
538
+
539
+ @overload
540
+ def __getitem__(
541
+ self,
542
+ key: slice,
543
+ ) -> Intervals: ...
544
+
545
+ def __getitem__(
546
+ self,
547
+ key: int | slice,
548
+ ) -> Intervals | Interval:
549
+ if isinstance(key, slice):
550
+ return Intervals(*self.intervals[key])
551
+
552
+ elif isinstance(key, int):
553
+ return self.intervals[key]
554
+
555
+ else:
556
+ raise TypeError("Invalid key type")
557
+
518
558
 
519
559
  class Traveller(BaseTraveller):
520
560
  def __init__(
File without changes
File without changes