batutils 2.2.0__tar.gz → 2.2.1__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 (79) hide show
  1. {batutils-2.2.0 → batutils-2.2.1}/PKG-INFO +62 -41
  2. batutils-2.2.1/README.md +95 -0
  3. {batutils-2.2.0 → batutils-2.2.1}/batutils/__init__.py +1 -1
  4. {batutils-2.2.0 → batutils-2.2.1}/batutils.egg-info/PKG-INFO +62 -41
  5. {batutils-2.2.0 → batutils-2.2.1}/batutils.egg-info/top_level.txt +1 -0
  6. batutils-2.2.0/README.md +0 -74
  7. {batutils-2.2.0 → batutils-2.2.1}/LICENSE +0 -0
  8. {batutils-2.2.0 → batutils-2.2.1}/batutils/_common/__init__.py +0 -0
  9. {batutils-2.2.0 → batutils-2.2.1}/batutils/_common/_decode.py +0 -0
  10. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/__init__.py +0 -0
  11. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/casting/__init__.py +0 -0
  12. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/casting/_any.py +0 -0
  13. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/casting/_filetime.py +0 -0
  14. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/casting/_instant.py +0 -0
  15. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/casting/_string.py +0 -0
  16. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/casting/_timestamp.py +0 -0
  17. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/formatting/__init__.py +0 -0
  18. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/formatting/_delta.py +0 -0
  19. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/formatting/_serialize.py +0 -0
  20. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/parsers/__init__.py +0 -0
  21. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/parsers/_string.py +0 -0
  22. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/parsers/_timedelta.py +0 -0
  23. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/shortcuts/__init__.py +0 -0
  24. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/shortcuts/_aliases.py +0 -0
  25. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/shortcuts/_checkers.py +0 -0
  26. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/shortcuts/_finders.py +0 -0
  27. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/structs/__init__.py +0 -0
  28. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/structs/_base.py +0 -0
  29. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/structs/_deltasplit.py +0 -0
  30. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/structs/_types.py +0 -0
  31. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/structs/aliases.py +0 -0
  32. {batutils-2.2.0 → batutils-2.2.1}/batutils/dtu/structs/consts.py +0 -0
  33. {batutils-2.2.0 → batutils-2.2.1}/batutils/structs/__init__.py +0 -0
  34. {batutils-2.2.0 → batutils-2.2.1}/batutils/structs/_base.py +0 -0
  35. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/__init__.py +0 -0
  36. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/casting/__init__.py +0 -0
  37. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/casting/_currency.py +0 -0
  38. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/casting/_evals.py +0 -0
  39. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/casting/_ip.py +0 -0
  40. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/casting/_mask.py +0 -0
  41. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/casting/_params.py +0 -0
  42. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/casting/_serialize.py +0 -0
  43. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/comparison/__init__.py +0 -0
  44. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/comparison/_mixin.py +0 -0
  45. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/insp/__init__.py +0 -0
  46. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/insp/_insp_old.py +0 -0
  47. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/insp/_typecheck.py +0 -0
  48. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/iters/__init__.py +0 -0
  49. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/iters/_attrs.py +0 -0
  50. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/iters/_dicts.py +0 -0
  51. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/iters/_group.py +0 -0
  52. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/iters/_lists.py +0 -0
  53. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/size/__init__.py +0 -0
  54. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/size/_total.py +0 -0
  55. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/strimp/__init__.py +0 -0
  56. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/strimp/_getters.py +0 -0
  57. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/string/__init__.py +0 -0
  58. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/string/_string.py +0 -0
  59. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/__init__.py +0 -0
  60. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/_base.py +0 -0
  61. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/empty/__init__.py +0 -0
  62. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/empty/_empty.py +0 -0
  63. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/enumex/__init__.py +0 -0
  64. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/enumex/_enumextra.py +0 -0
  65. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/fluid/__init__.py +0 -0
  66. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/fluid/_attrfluid.py +0 -0
  67. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/sentience/__init__.py +0 -0
  68. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/sentience/_builder.py +0 -0
  69. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/serializers/__init__.py +0 -0
  70. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/serializers/_json.py +0 -0
  71. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/serializers/_jsonsafe.py +0 -0
  72. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/serializers/_universal.py +0 -0
  73. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/singleton/__init__.py +0 -0
  74. {batutils-2.2.0 → batutils-2.2.1}/batutils/tpu/structs/singleton/_singleton.py +0 -0
  75. {batutils-2.2.0 → batutils-2.2.1}/batutils.egg-info/SOURCES.txt +0 -0
  76. {batutils-2.2.0 → batutils-2.2.1}/batutils.egg-info/dependency_links.txt +0 -0
  77. {batutils-2.2.0 → batutils-2.2.1}/pyproject.toml +0 -0
  78. {batutils-2.2.0 → batutils-2.2.1}/setup.cfg +0 -0
  79. {batutils-2.2.0 → batutils-2.2.1}/setup.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: batutils
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Team Batcave's utilities for date and/or time objects and values and messing with types and so much more.
5
5
  Author-email: Thordur Matthiasson <doddi79@gmail.com>, John Aldis <johnaldis@ccpgames.com>
6
6
  License: MIT License
@@ -50,57 +50,69 @@ Description-Content-Type: text/markdown
50
50
  License-File: LICENSE
51
51
  Dynamic: license-file
52
52
 
53
- # Team Batcave Python Toolkit
53
+ # batutils - Team Batcave Python Toolkit
54
54
 
55
- The `batutils` is a fork of the `batutils` package in order to continue its
56
- development and maintenance beyond Team Batcave's lifespan.
55
+ [![PyPI](https://img.shields.io/pypi/v/batutils)](https://pypi.org/project/batutils/)
57
56
 
58
- It is a smooshup of a few Python packages from the CCP Tools Team of old (Team
59
- Batcave).
57
+ A grab-bag of small, dependency-free Python utilities for working with dates
58
+ and times and for everyday type juggling, originally written by Team Batcave
59
+ at CCP Games.
60
60
 
61
- Our two most commonly used internal packages, called `datetimeutils` and
62
- `typeutils` were too _generically_ named for Pypi.org and since they were
63
- both used in something like 80-90% of our other projects, it made sense to
64
- just smoosh them together in one module, and thus, the `batutils` package
65
- was born.
66
-
67
- Here's the README of the [Date Time Utils](batutils/dtu/README.md) submodule.
68
-
69
- Here's the README of the [Type Utils](batutils/tpu/README.md) submodule.
61
+ This is a fork of [`ccptools`](https://github.com/ccpgames/ccptools), kept alive
62
+ beyond the original team's lifespan. Our two most commonly used internal packages,
63
+ `datetimeutils` and `typeutils`, had names that were too generic for PyPI and were
64
+ used in 80-90% of our other projects, so they were smooshed together into one
65
+ package.
70
66
 
67
+ ```bash
68
+ pip install batutils
69
+ ```
71
70
 
72
- ### Changes from `ccptools`
71
+ Requires Python 3.10 or newer.
73
72
 
74
- The `legacyapi` submodule has been removed.
73
+ ## What's inside
75
74
 
75
+ | Submodule | Formerly | What it is | Docs |
76
+ |-----------|----------|------------|------|
77
+ | `batutils.dtu` | `datetimeutils` | Casting, parsing, formatting and shortcuts for date/time values | [Date/Time Utils](batutils/dtu/README.md) |
78
+ | `batutils.tpu` | `typeutils` | Safe type evaluation, nested dict/list helpers, enums, singletons, serializers and more | [Type Utils](batutils/tpu/README.md) |
79
+ | `batutils.structs` | | One-line "usual imports" for your modules | [below](#common-imports) |
76
80
 
77
- ## Date-Time Utils
81
+ **Looking for a specific function?** Use the task-oriented
82
+ [Public API index](docs/api-index.md).
78
83
 
79
- The old `datetimeutils` package is now included here as the `dtu` submodule.
84
+ ## Quick taste
80
85
 
81
86
  ```python
82
87
  from batutils import dtu
88
+ from batutils.tpu.casting import int_eval, bool_eval
89
+ from batutils.tpu.iters import nested_get
90
+
91
+ dtu.any_to_datetime('2024-04-02 13:47:25') # datetime(2024, 4, 2, 13, 47, 25)
92
+ dtu.agostr(dtu.ago(days=5)) # '5 days'
93
+ int_eval('0x10') # 16
94
+ bool_eval('Yes') # True
95
+ nested_get({'a': {'b': [1, 2, 3]}}, ('a', 'b', -1)) # 3
83
96
  ```
84
97
 
85
- ## Structs
98
+ ## Common imports
99
+
100
+ `from batutils.structs import *` pulls in the imports that nearly every file in
101
+ our projects needs:
86
102
 
87
- Importing `*` from the `structs` submodule will import all of the most
88
- commonly used imports in our projects:
89
103
  ```python
90
- from typing import * # For type annotation
91
-
92
- import abc # For interfaces (Abstract Base Classes)
93
- import dataclasses # For dataclass structs
94
- import decimal # Used whenever we're handling money
95
- import enum # Also used for struct creation
96
- import logging # Used pretty much everywhere
97
- import re # Used surprisingly frequently
98
- import time # Very commonly used
104
+ from typing import * # for type annotations
105
+ import abc # interfaces (Abstract Base Classes)
106
+ import dataclasses # dataclass structs
107
+ import decimal # anything involving money
108
+ import enum # also used for struct creation
109
+ import logging # used pretty much everywhere
110
+ import re # used surprisingly frequently
111
+ import time # very commonly used
99
112
  ```
100
113
 
101
- Note that datetime is not included in this. That's because tt'll also import
102
- the aliases from the Datetime Utils (`batutils.dtu.structs.aliases`)
103
- package instead:
114
+ `datetime` itself is not included. Instead you get the date/time aliases from
115
+ `batutils.dtu.structs.aliases`:
104
116
 
105
117
  ```python
106
118
  Date = datetime.date
@@ -111,16 +123,25 @@ TzInfo = datetime.tzinfo
111
123
  TimeZone = datetime.timezone
112
124
  ```
113
125
 
114
- Furthermore, it'll also include a few of the most commonly used utility
115
- classes from the Type Utils submodule:
126
+ Plus a few of the most commonly used helpers from the type utils:
116
127
 
117
- - The `Singleton` Meta Class
118
- - The `Empty` and `EmptyDict` classes as well as the `if_empty` method
119
- - The `EnumEx` base class for Enums with the `from_any` class method
128
+ - the `Singleton` metaclass
129
+ - `Empty`, `EmptyDict` and `if_empty`
130
+ - the `EnumEx` base class for enums (adds the `from_any` class method)
120
131
 
121
- So in most cases we can cover something like 90% of any imports we tend to
122
- need in every Python file with a single line:
132
+ So one line covers roughly 90% of the imports we need in any given file:
123
133
 
124
134
  ```python
125
135
  from batutils.structs import *
126
136
  ```
137
+
138
+ ## Changes from `ccptools`
139
+
140
+ The `legacyapi` submodule has been removed. See the [changelog](CHANGELOG.md)
141
+ for the full history.
142
+
143
+ ## Contributing and license
144
+
145
+ Issues and pull requests are welcome at
146
+ [github.com/doddi79/batutils](https://github.com/doddi79/batutils). Released
147
+ under the [MIT License](LICENSE).
@@ -0,0 +1,95 @@
1
+ # batutils - Team Batcave Python Toolkit
2
+
3
+ [![PyPI](https://img.shields.io/pypi/v/batutils)](https://pypi.org/project/batutils/)
4
+
5
+ A grab-bag of small, dependency-free Python utilities for working with dates
6
+ and times and for everyday type juggling, originally written by Team Batcave
7
+ at CCP Games.
8
+
9
+ This is a fork of [`ccptools`](https://github.com/ccpgames/ccptools), kept alive
10
+ beyond the original team's lifespan. Our two most commonly used internal packages,
11
+ `datetimeutils` and `typeutils`, had names that were too generic for PyPI and were
12
+ used in 80-90% of our other projects, so they were smooshed together into one
13
+ package.
14
+
15
+ ```bash
16
+ pip install batutils
17
+ ```
18
+
19
+ Requires Python 3.10 or newer.
20
+
21
+ ## What's inside
22
+
23
+ | Submodule | Formerly | What it is | Docs |
24
+ |-----------|----------|------------|------|
25
+ | `batutils.dtu` | `datetimeutils` | Casting, parsing, formatting and shortcuts for date/time values | [Date/Time Utils](batutils/dtu/README.md) |
26
+ | `batutils.tpu` | `typeutils` | Safe type evaluation, nested dict/list helpers, enums, singletons, serializers and more | [Type Utils](batutils/tpu/README.md) |
27
+ | `batutils.structs` | | One-line "usual imports" for your modules | [below](#common-imports) |
28
+
29
+ **Looking for a specific function?** Use the task-oriented
30
+ [Public API index](docs/api-index.md).
31
+
32
+ ## Quick taste
33
+
34
+ ```python
35
+ from batutils import dtu
36
+ from batutils.tpu.casting import int_eval, bool_eval
37
+ from batutils.tpu.iters import nested_get
38
+
39
+ dtu.any_to_datetime('2024-04-02 13:47:25') # datetime(2024, 4, 2, 13, 47, 25)
40
+ dtu.agostr(dtu.ago(days=5)) # '5 days'
41
+ int_eval('0x10') # 16
42
+ bool_eval('Yes') # True
43
+ nested_get({'a': {'b': [1, 2, 3]}}, ('a', 'b', -1)) # 3
44
+ ```
45
+
46
+ ## Common imports
47
+
48
+ `from batutils.structs import *` pulls in the imports that nearly every file in
49
+ our projects needs:
50
+
51
+ ```python
52
+ from typing import * # for type annotations
53
+ import abc # interfaces (Abstract Base Classes)
54
+ import dataclasses # dataclass structs
55
+ import decimal # anything involving money
56
+ import enum # also used for struct creation
57
+ import logging # used pretty much everywhere
58
+ import re # used surprisingly frequently
59
+ import time # very commonly used
60
+ ```
61
+
62
+ `datetime` itself is not included. Instead you get the date/time aliases from
63
+ `batutils.dtu.structs.aliases`:
64
+
65
+ ```python
66
+ Date = datetime.date
67
+ Time = datetime.time
68
+ Datetime = datetime.datetime
69
+ TimeDelta = datetime.timedelta
70
+ TzInfo = datetime.tzinfo
71
+ TimeZone = datetime.timezone
72
+ ```
73
+
74
+ Plus a few of the most commonly used helpers from the type utils:
75
+
76
+ - the `Singleton` metaclass
77
+ - `Empty`, `EmptyDict` and `if_empty`
78
+ - the `EnumEx` base class for enums (adds the `from_any` class method)
79
+
80
+ So one line covers roughly 90% of the imports we need in any given file:
81
+
82
+ ```python
83
+ from batutils.structs import *
84
+ ```
85
+
86
+ ## Changes from `ccptools`
87
+
88
+ The `legacyapi` submodule has been removed. See the [changelog](CHANGELOG.md)
89
+ for the full history.
90
+
91
+ ## Contributing and license
92
+
93
+ Issues and pull requests are welcome at
94
+ [github.com/doddi79/batutils](https://github.com/doddi79/batutils). Released
95
+ under the [MIT License](LICENSE).
@@ -1,4 +1,4 @@
1
- __version__ = '2.2.0'
1
+ __version__ = '2.2.1'
2
2
 
3
3
  __author__ = 'Thordur Matthiasson <doddi79@gmail.com>'
4
4
  __license__ = 'MIT License'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: batutils
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: Team Batcave's utilities for date and/or time objects and values and messing with types and so much more.
5
5
  Author-email: Thordur Matthiasson <doddi79@gmail.com>, John Aldis <johnaldis@ccpgames.com>
6
6
  License: MIT License
@@ -50,57 +50,69 @@ Description-Content-Type: text/markdown
50
50
  License-File: LICENSE
51
51
  Dynamic: license-file
52
52
 
53
- # Team Batcave Python Toolkit
53
+ # batutils - Team Batcave Python Toolkit
54
54
 
55
- The `batutils` is a fork of the `batutils` package in order to continue its
56
- development and maintenance beyond Team Batcave's lifespan.
55
+ [![PyPI](https://img.shields.io/pypi/v/batutils)](https://pypi.org/project/batutils/)
57
56
 
58
- It is a smooshup of a few Python packages from the CCP Tools Team of old (Team
59
- Batcave).
57
+ A grab-bag of small, dependency-free Python utilities for working with dates
58
+ and times and for everyday type juggling, originally written by Team Batcave
59
+ at CCP Games.
60
60
 
61
- Our two most commonly used internal packages, called `datetimeutils` and
62
- `typeutils` were too _generically_ named for Pypi.org and since they were
63
- both used in something like 80-90% of our other projects, it made sense to
64
- just smoosh them together in one module, and thus, the `batutils` package
65
- was born.
66
-
67
- Here's the README of the [Date Time Utils](batutils/dtu/README.md) submodule.
68
-
69
- Here's the README of the [Type Utils](batutils/tpu/README.md) submodule.
61
+ This is a fork of [`ccptools`](https://github.com/ccpgames/ccptools), kept alive
62
+ beyond the original team's lifespan. Our two most commonly used internal packages,
63
+ `datetimeutils` and `typeutils`, had names that were too generic for PyPI and were
64
+ used in 80-90% of our other projects, so they were smooshed together into one
65
+ package.
70
66
 
67
+ ```bash
68
+ pip install batutils
69
+ ```
71
70
 
72
- ### Changes from `ccptools`
71
+ Requires Python 3.10 or newer.
73
72
 
74
- The `legacyapi` submodule has been removed.
73
+ ## What's inside
75
74
 
75
+ | Submodule | Formerly | What it is | Docs |
76
+ |-----------|----------|------------|------|
77
+ | `batutils.dtu` | `datetimeutils` | Casting, parsing, formatting and shortcuts for date/time values | [Date/Time Utils](batutils/dtu/README.md) |
78
+ | `batutils.tpu` | `typeutils` | Safe type evaluation, nested dict/list helpers, enums, singletons, serializers and more | [Type Utils](batutils/tpu/README.md) |
79
+ | `batutils.structs` | | One-line "usual imports" for your modules | [below](#common-imports) |
76
80
 
77
- ## Date-Time Utils
81
+ **Looking for a specific function?** Use the task-oriented
82
+ [Public API index](docs/api-index.md).
78
83
 
79
- The old `datetimeutils` package is now included here as the `dtu` submodule.
84
+ ## Quick taste
80
85
 
81
86
  ```python
82
87
  from batutils import dtu
88
+ from batutils.tpu.casting import int_eval, bool_eval
89
+ from batutils.tpu.iters import nested_get
90
+
91
+ dtu.any_to_datetime('2024-04-02 13:47:25') # datetime(2024, 4, 2, 13, 47, 25)
92
+ dtu.agostr(dtu.ago(days=5)) # '5 days'
93
+ int_eval('0x10') # 16
94
+ bool_eval('Yes') # True
95
+ nested_get({'a': {'b': [1, 2, 3]}}, ('a', 'b', -1)) # 3
83
96
  ```
84
97
 
85
- ## Structs
98
+ ## Common imports
99
+
100
+ `from batutils.structs import *` pulls in the imports that nearly every file in
101
+ our projects needs:
86
102
 
87
- Importing `*` from the `structs` submodule will import all of the most
88
- commonly used imports in our projects:
89
103
  ```python
90
- from typing import * # For type annotation
91
-
92
- import abc # For interfaces (Abstract Base Classes)
93
- import dataclasses # For dataclass structs
94
- import decimal # Used whenever we're handling money
95
- import enum # Also used for struct creation
96
- import logging # Used pretty much everywhere
97
- import re # Used surprisingly frequently
98
- import time # Very commonly used
104
+ from typing import * # for type annotations
105
+ import abc # interfaces (Abstract Base Classes)
106
+ import dataclasses # dataclass structs
107
+ import decimal # anything involving money
108
+ import enum # also used for struct creation
109
+ import logging # used pretty much everywhere
110
+ import re # used surprisingly frequently
111
+ import time # very commonly used
99
112
  ```
100
113
 
101
- Note that datetime is not included in this. That's because tt'll also import
102
- the aliases from the Datetime Utils (`batutils.dtu.structs.aliases`)
103
- package instead:
114
+ `datetime` itself is not included. Instead you get the date/time aliases from
115
+ `batutils.dtu.structs.aliases`:
104
116
 
105
117
  ```python
106
118
  Date = datetime.date
@@ -111,16 +123,25 @@ TzInfo = datetime.tzinfo
111
123
  TimeZone = datetime.timezone
112
124
  ```
113
125
 
114
- Furthermore, it'll also include a few of the most commonly used utility
115
- classes from the Type Utils submodule:
126
+ Plus a few of the most commonly used helpers from the type utils:
116
127
 
117
- - The `Singleton` Meta Class
118
- - The `Empty` and `EmptyDict` classes as well as the `if_empty` method
119
- - The `EnumEx` base class for Enums with the `from_any` class method
128
+ - the `Singleton` metaclass
129
+ - `Empty`, `EmptyDict` and `if_empty`
130
+ - the `EnumEx` base class for enums (adds the `from_any` class method)
120
131
 
121
- So in most cases we can cover something like 90% of any imports we tend to
122
- need in every Python file with a single line:
132
+ So one line covers roughly 90% of the imports we need in any given file:
123
133
 
124
134
  ```python
125
135
  from batutils.structs import *
126
136
  ```
137
+
138
+ ## Changes from `ccptools`
139
+
140
+ The `legacyapi` submodule has been removed. See the [changelog](CHANGELOG.md)
141
+ for the full history.
142
+
143
+ ## Contributing and license
144
+
145
+ Issues and pull requests are welcome at
146
+ [github.com/doddi79/batutils](https://github.com/doddi79/batutils). Released
147
+ under the [MIT License](LICENSE).
batutils-2.2.0/README.md DELETED
@@ -1,74 +0,0 @@
1
- # Team Batcave Python Toolkit
2
-
3
- The `batutils` is a fork of the `batutils` package in order to continue its
4
- development and maintenance beyond Team Batcave's lifespan.
5
-
6
- It is a smooshup of a few Python packages from the CCP Tools Team of old (Team
7
- Batcave).
8
-
9
- Our two most commonly used internal packages, called `datetimeutils` and
10
- `typeutils` were too _generically_ named for Pypi.org and since they were
11
- both used in something like 80-90% of our other projects, it made sense to
12
- just smoosh them together in one module, and thus, the `batutils` package
13
- was born.
14
-
15
- Here's the README of the [Date Time Utils](batutils/dtu/README.md) submodule.
16
-
17
- Here's the README of the [Type Utils](batutils/tpu/README.md) submodule.
18
-
19
-
20
- ### Changes from `ccptools`
21
-
22
- The `legacyapi` submodule has been removed.
23
-
24
-
25
- ## Date-Time Utils
26
-
27
- The old `datetimeutils` package is now included here as the `dtu` submodule.
28
-
29
- ```python
30
- from batutils import dtu
31
- ```
32
-
33
- ## Structs
34
-
35
- Importing `*` from the `structs` submodule will import all of the most
36
- commonly used imports in our projects:
37
- ```python
38
- from typing import * # For type annotation
39
-
40
- import abc # For interfaces (Abstract Base Classes)
41
- import dataclasses # For dataclass structs
42
- import decimal # Used whenever we're handling money
43
- import enum # Also used for struct creation
44
- import logging # Used pretty much everywhere
45
- import re # Used surprisingly frequently
46
- import time # Very commonly used
47
- ```
48
-
49
- Note that datetime is not included in this. That's because tt'll also import
50
- the aliases from the Datetime Utils (`batutils.dtu.structs.aliases`)
51
- package instead:
52
-
53
- ```python
54
- Date = datetime.date
55
- Time = datetime.time
56
- Datetime = datetime.datetime
57
- TimeDelta = datetime.timedelta
58
- TzInfo = datetime.tzinfo
59
- TimeZone = datetime.timezone
60
- ```
61
-
62
- Furthermore, it'll also include a few of the most commonly used utility
63
- classes from the Type Utils submodule:
64
-
65
- - The `Singleton` Meta Class
66
- - The `Empty` and `EmptyDict` classes as well as the `if_empty` method
67
- - The `EnumEx` base class for Enums with the `from_any` class method
68
-
69
- So in most cases we can cover something like 90% of any imports we tend to
70
- need in every Python file with a single line:
71
-
72
- ```python
73
- from batutils.structs import *
74
- ```
File without changes
File without changes
File without changes
File without changes