wom-py 0.1.0__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 (45) hide show
  1. wom_py-0.1.0/LICENSE +21 -0
  2. wom_py-0.1.0/PKG-INFO +105 -0
  3. wom_py-0.1.0/README.md +71 -0
  4. wom_py-0.1.0/pyproject.toml +86 -0
  5. wom_py-0.1.0/setup.py +45 -0
  6. wom_py-0.1.0/wom/__init__.py +143 -0
  7. wom_py-0.1.0/wom/__main__.py +29 -0
  8. wom_py-0.1.0/wom/_cli.py +45 -0
  9. wom_py-0.1.0/wom/client.py +276 -0
  10. wom_py-0.1.0/wom/constants.py +30 -0
  11. wom_py-0.1.0/wom/enums.py +242 -0
  12. wom_py-0.1.0/wom/errors.py +46 -0
  13. wom_py-0.1.0/wom/models/__init__.py +104 -0
  14. wom_py-0.1.0/wom/models/base.py +41 -0
  15. wom_py-0.1.0/wom/models/competitions/__init__.py +44 -0
  16. wom_py-0.1.0/wom/models/competitions/enums.py +43 -0
  17. wom_py-0.1.0/wom/models/competitions/models.py +275 -0
  18. wom_py-0.1.0/wom/models/deltas/__init__.py +28 -0
  19. wom_py-0.1.0/wom/models/deltas/models.py +51 -0
  20. wom_py-0.1.0/wom/models/groups/__init__.py +43 -0
  21. wom_py-0.1.0/wom/models/groups/enums.py +300 -0
  22. wom_py-0.1.0/wom/models/groups/models.py +252 -0
  23. wom_py-0.1.0/wom/models/http.py +52 -0
  24. wom_py-0.1.0/wom/models/names/__init__.py +34 -0
  25. wom_py-0.1.0/wom/models/names/enums.py +34 -0
  26. wom_py-0.1.0/wom/models/names/models.py +118 -0
  27. wom_py-0.1.0/wom/models/players/__init__.py +54 -0
  28. wom_py-0.1.0/wom/models/players/enums.py +317 -0
  29. wom_py-0.1.0/wom/models/players/models.py +477 -0
  30. wom_py-0.1.0/wom/models/records/__init__.py +28 -0
  31. wom_py-0.1.0/wom/models/records/models.py +69 -0
  32. wom_py-0.1.0/wom/py.typed +0 -0
  33. wom_py-0.1.0/wom/result.py +202 -0
  34. wom_py-0.1.0/wom/routes.py +153 -0
  35. wom_py-0.1.0/wom/serializer.py +954 -0
  36. wom_py-0.1.0/wom/services/__init__.py +48 -0
  37. wom_py-0.1.0/wom/services/base.py +54 -0
  38. wom_py-0.1.0/wom/services/competitions.py +631 -0
  39. wom_py-0.1.0/wom/services/deltas.py +103 -0
  40. wom_py-0.1.0/wom/services/efficiency.py +100 -0
  41. wom_py-0.1.0/wom/services/groups.py +778 -0
  42. wom_py-0.1.0/wom/services/http.py +167 -0
  43. wom_py-0.1.0/wom/services/names.py +147 -0
  44. wom_py-0.1.0/wom/services/players.py +568 -0
  45. wom_py-0.1.0/wom/services/records.py +102 -0
wom_py-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023-present Jonxslays
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
wom_py-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,105 @@
1
+ Metadata-Version: 2.1
2
+ Name: wom-py
3
+ Version: 0.1.0
4
+ Summary: An asynchronous wrapper for the Wise Old Man API.
5
+ Home-page: https://github.com/Jonxslays/wom.py
6
+ License: MIT
7
+ Author: Jonxslays
8
+ Requires-Python: >=3.8
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Framework :: AsyncIO
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.8
16
+ Classifier: Programming Language :: Python :: 3.9
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.7
23
+ Classifier: Programming Language :: Python :: 3.8
24
+ Classifier: Programming Language :: Python :: 3.9
25
+ Classifier: Topic :: Software Development :: Libraries
26
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
+ Classifier: Typing :: Typed
28
+ Requires-Dist: aiohttp (==3.8.4)
29
+ Requires-Dist: attrs (==22.2.0)
30
+ Project-URL: Documentation, https://jonxslays.github.io/wom.py
31
+ Project-URL: Repository, https://github.com/Jonxslays/wom.py
32
+ Description-Content-Type: text/markdown
33
+
34
+ # wom.py
35
+
36
+ An asynchronous wrapper for the [Wise Old Man API](https://docs.wiseoldman.net/).
37
+
38
+ The library aims to make is easy to interact with the Wise Old Man API by
39
+ providing service methods for all available endpoints and model classes
40
+ for data consistency.
41
+
42
+ ## Disclaimer
43
+
44
+ The library is in early development, and as such features or public interfaces
45
+ may change at any time. Thanks for following our progress!
46
+
47
+ ## Documentation
48
+
49
+ - [Stable](https://jonxslays.github.io/wom.py/)
50
+ - [Development](https://jonxslays.github.io/wom.py/dev/)
51
+
52
+ ## Installation
53
+
54
+ ### Stable
55
+
56
+ ```sh
57
+ pip install -U wom.py
58
+ ```
59
+
60
+ ### Development
61
+
62
+ ```sh
63
+ pip install -U git+https://github.com/Jonxslays/wom.py
64
+ ```
65
+
66
+ For more information on using `pip`, check out the [pip documentation](https://pip.pypa.io/en/stable/).
67
+
68
+ ## What is Wise Old Man
69
+
70
+ Wise Old Man is an open source Oldschool Runescape player progress tracker.
71
+
72
+ If you're interested in learning more about the Wise Old Man project, consider checking out any of these links:
73
+
74
+ - [Website](https://wiseoldman.net/)
75
+ - [API documentation](https://docs.wiseoldman.net/)
76
+ - [Github repository](https://wiseoldman.net/github)
77
+ - [Discord community](https://wiseoldman.net/discord)
78
+ - [Support the developers on Patreon](https://wiseoldman.net/patreon)
79
+
80
+ Some of the popular features include:
81
+
82
+ - Experience tracking
83
+ - Boss killcounts
84
+ - Player achievements
85
+ - Group competitions
86
+ - Global leaderboards
87
+ - A discord bot for interacting with the API
88
+
89
+ ## Problems
90
+
91
+ If you're experiencing a problem with the library, please open an issue
92
+ [here](https://github.com/Jonxslays/wom.py/issues), after first confirming
93
+ a similar issue was not already created.
94
+
95
+ ## Contributing
96
+
97
+ wom.py is open to contributions.
98
+
99
+ Come back soon™ once I've written the contributing guide.
100
+
101
+ ## License
102
+
103
+ wom.py is licensed under the
104
+ [MIT License](https://github.com/Jonxslays/wom.py/blob/master/LICENSE).
105
+
wom_py-0.1.0/README.md ADDED
@@ -0,0 +1,71 @@
1
+ # wom.py
2
+
3
+ An asynchronous wrapper for the [Wise Old Man API](https://docs.wiseoldman.net/).
4
+
5
+ The library aims to make is easy to interact with the Wise Old Man API by
6
+ providing service methods for all available endpoints and model classes
7
+ for data consistency.
8
+
9
+ ## Disclaimer
10
+
11
+ The library is in early development, and as such features or public interfaces
12
+ may change at any time. Thanks for following our progress!
13
+
14
+ ## Documentation
15
+
16
+ - [Stable](https://jonxslays.github.io/wom.py/)
17
+ - [Development](https://jonxslays.github.io/wom.py/dev/)
18
+
19
+ ## Installation
20
+
21
+ ### Stable
22
+
23
+ ```sh
24
+ pip install -U wom.py
25
+ ```
26
+
27
+ ### Development
28
+
29
+ ```sh
30
+ pip install -U git+https://github.com/Jonxslays/wom.py
31
+ ```
32
+
33
+ For more information on using `pip`, check out the [pip documentation](https://pip.pypa.io/en/stable/).
34
+
35
+ ## What is Wise Old Man
36
+
37
+ Wise Old Man is an open source Oldschool Runescape player progress tracker.
38
+
39
+ If you're interested in learning more about the Wise Old Man project, consider checking out any of these links:
40
+
41
+ - [Website](https://wiseoldman.net/)
42
+ - [API documentation](https://docs.wiseoldman.net/)
43
+ - [Github repository](https://wiseoldman.net/github)
44
+ - [Discord community](https://wiseoldman.net/discord)
45
+ - [Support the developers on Patreon](https://wiseoldman.net/patreon)
46
+
47
+ Some of the popular features include:
48
+
49
+ - Experience tracking
50
+ - Boss killcounts
51
+ - Player achievements
52
+ - Group competitions
53
+ - Global leaderboards
54
+ - A discord bot for interacting with the API
55
+
56
+ ## Problems
57
+
58
+ If you're experiencing a problem with the library, please open an issue
59
+ [here](https://github.com/Jonxslays/wom.py/issues), after first confirming
60
+ a similar issue was not already created.
61
+
62
+ ## Contributing
63
+
64
+ wom.py is open to contributions.
65
+
66
+ Come back soon™ once I've written the contributing guide.
67
+
68
+ ## License
69
+
70
+ wom.py is licensed under the
71
+ [MIT License](https://github.com/Jonxslays/wom.py/blob/master/LICENSE).
@@ -0,0 +1,86 @@
1
+ [tool.poetry]
2
+ name = "wom.py"
3
+ version = "0.1.0"
4
+ description = "An asynchronous wrapper for the Wise Old Man API."
5
+ authors = ["Jonxslays"]
6
+ license = "MIT"
7
+ readme = "README.md"
8
+ homepage = "https://github.com/Jonxslays/wom.py"
9
+ repository = "https://github.com/Jonxslays/wom.py"
10
+ documentation = "https://jonxslays.github.io/wom.py"
11
+ packages = [
12
+ { include = "wom" },
13
+ { include = "wom/py.typed" },
14
+ ]
15
+ classifiers = [
16
+ "Development Status :: 3 - Alpha",
17
+ "Framework :: AsyncIO",
18
+ "Intended Audience :: Developers",
19
+ "License :: OSI Approved :: MIT License",
20
+ "Operating System :: OS Independent",
21
+ "Programming Language :: Python :: 3.7",
22
+ "Programming Language :: Python :: 3.8",
23
+ "Programming Language :: Python :: 3.9",
24
+ "Programming Language :: Python :: 3.10",
25
+ "Programming Language :: Python :: 3.11",
26
+ "Programming Language :: Python :: 3 :: Only",
27
+ "Topic :: Software Development :: Libraries",
28
+ "Topic :: Software Development :: Libraries :: Python Modules",
29
+ "Typing :: Typed",
30
+ ]
31
+
32
+ [tool.poetry.scripts]
33
+ wompy = "wom._cli:info"
34
+
35
+ [tool.poetry.dependencies]
36
+ python = ">=3.8"
37
+ aiohttp = "==3.8.4"
38
+ attrs = "22.2.0"
39
+
40
+ [tool.poetry.group.dev.dependencies]
41
+ black = "==23.1.0"
42
+ coverage = "==7.1.0"
43
+ flake8 = { version = "==6.0.0", python = ">=3.8.1" }
44
+ isort = "==5.12.0"
45
+ len8 = { version = "==0.7.3.post0", python = "<3.12" }
46
+ mike = "==1.1.2"
47
+ mkdocs-include-markdown-plugin = { version = "==4.0.3", python = "<3.12" }
48
+ mkdocs-material = "==9.0.13"
49
+ mkdocstrings = { version = "==0.20.0", extras = ["python"] }
50
+ mypy = "==1.0.0"
51
+ nox = "==2022.11.21"
52
+ pyright = "==1.1.293"
53
+ pytest = "==7.2.1"
54
+ pytest-asyncio = "==0.20.3"
55
+ pytest-testdox = "==3.0.1"
56
+ types-toml = "==0.10.8.3"
57
+ toml = "==0.10.2"
58
+
59
+ [tool.black]
60
+ line-length = 99
61
+
62
+ [tool.isort]
63
+ profile = "black"
64
+ force_single_line = true
65
+
66
+ [tool.len8]
67
+ include = ["noxfile.py", "tests", "wom"]
68
+ code-length = 99
69
+ docs-length = 80
70
+ strict = true
71
+
72
+ [tool.mypy]
73
+ packages = ["wom"]
74
+ strict = true
75
+
76
+ [tool.pyright]
77
+ include = ["wom", "tests"]
78
+ typeCheckingMode = "strict"
79
+ reportImportCycles = false
80
+
81
+ [tool.pytest.ini_options]
82
+ asyncio_mode = "auto"
83
+
84
+ [build-system]
85
+ requires = ["poetry-core"]
86
+ build-backend = "poetry.core.masonry.api"
wom_py-0.1.0/setup.py ADDED
@@ -0,0 +1,45 @@
1
+ # -*- coding: utf-8 -*-
2
+ from setuptools import setup
3
+
4
+ packages = \
5
+ ['wom',
6
+ 'wom.models',
7
+ 'wom.models.competitions',
8
+ 'wom.models.deltas',
9
+ 'wom.models.groups',
10
+ 'wom.models.names',
11
+ 'wom.models.players',
12
+ 'wom.models.records',
13
+ 'wom.services']
14
+
15
+ package_data = \
16
+ {'': ['*']}
17
+
18
+ modules = \
19
+ ['py']
20
+ install_requires = \
21
+ ['aiohttp==3.8.4', 'attrs==22.2.0']
22
+
23
+ entry_points = \
24
+ {'console_scripts': ['wompy = wom._cli:info']}
25
+
26
+ setup_kwargs = {
27
+ 'name': 'wom-py',
28
+ 'version': '0.1.0',
29
+ 'description': 'An asynchronous wrapper for the Wise Old Man API.',
30
+ 'long_description': "# wom.py\n\nAn asynchronous wrapper for the [Wise Old Man API](https://docs.wiseoldman.net/).\n\nThe library aims to make is easy to interact with the Wise Old Man API by\nproviding service methods for all available endpoints and model classes\nfor data consistency.\n\n## Disclaimer\n\nThe library is in early development, and as such features or public interfaces\nmay change at any time. Thanks for following our progress!\n\n## Documentation\n\n- [Stable](https://jonxslays.github.io/wom.py/)\n- [Development](https://jonxslays.github.io/wom.py/dev/)\n\n## Installation\n\n### Stable\n\n```sh\npip install -U wom.py\n```\n\n### Development\n\n```sh\npip install -U git+https://github.com/Jonxslays/wom.py\n```\n\nFor more information on using `pip`, check out the [pip documentation](https://pip.pypa.io/en/stable/).\n\n## What is Wise Old Man\n\nWise Old Man is an open source Oldschool Runescape player progress tracker.\n\nIf you're interested in learning more about the Wise Old Man project, consider checking out any of these links:\n\n- [Website](https://wiseoldman.net/)\n- [API documentation](https://docs.wiseoldman.net/)\n- [Github repository](https://wiseoldman.net/github)\n- [Discord community](https://wiseoldman.net/discord)\n- [Support the developers on Patreon](https://wiseoldman.net/patreon)\n\nSome of the popular features include:\n\n- Experience tracking\n- Boss killcounts\n- Player achievements\n- Group competitions\n- Global leaderboards\n- A discord bot for interacting with the API\n\n## Problems\n\nIf you're experiencing a problem with the library, please open an issue\n[here](https://github.com/Jonxslays/wom.py/issues), after first confirming\na similar issue was not already created.\n\n## Contributing\n\nwom.py is open to contributions.\n\nCome back soon™ once I've written the contributing guide.\n\n## License\n\nwom.py is licensed under the\n[MIT License](https://github.com/Jonxslays/wom.py/blob/master/LICENSE).\n",
31
+ 'author': 'Jonxslays',
32
+ 'author_email': 'None',
33
+ 'maintainer': 'None',
34
+ 'maintainer_email': 'None',
35
+ 'url': 'https://github.com/Jonxslays/wom.py',
36
+ 'packages': packages,
37
+ 'package_data': package_data,
38
+ 'py_modules': modules,
39
+ 'install_requires': install_requires,
40
+ 'entry_points': entry_points,
41
+ 'python_requires': '>=3.8',
42
+ }
43
+
44
+
45
+ setup(**setup_kwargs)
@@ -0,0 +1,143 @@
1
+ # wom.py - An asynchronous wrapper for the Wise Old Man API.
2
+ # Copyright (c) 2023-present Jonxslays
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in all
12
+ # copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ # SOFTWARE.
21
+
22
+ """All models, enums, services, etc are exported here in the main
23
+ wom module.
24
+
25
+ !!! tip
26
+
27
+ Know what you're looking for? Hit the search bar ^!
28
+ """
29
+
30
+ from __future__ import annotations
31
+
32
+ from typing import Final
33
+
34
+ __all__ = (
35
+ "client",
36
+ "constants",
37
+ "enums",
38
+ "errors",
39
+ "models",
40
+ "result",
41
+ "routes",
42
+ "serializer",
43
+ "services",
44
+ "Achievement",
45
+ "AchievementMeasure",
46
+ "AchievementProgress",
47
+ "Activities",
48
+ "Activity",
49
+ "BaseEnum",
50
+ "Boss",
51
+ "Bosses",
52
+ "BaseModel",
53
+ "Client",
54
+ "Country",
55
+ "Competition",
56
+ "CompetitionDetail",
57
+ "CompetitionHistoryDataPoint",
58
+ "CompetitionParticipationDetail",
59
+ "CompetitionParticipation",
60
+ "CompetitionProgress",
61
+ "CompetitionStatus",
62
+ "CompetitionType",
63
+ "CompetitionWithParticipations",
64
+ "CompiledRoute",
65
+ "ComputedMetric",
66
+ "ComputedMetrics",
67
+ "DeltaLeaderboardEntry",
68
+ "Err",
69
+ "Gains",
70
+ "GroupDetail",
71
+ "GroupHiscoresActivityItem",
72
+ "GroupHiscoresBossItem",
73
+ "GroupHiscoresComputedMetricItem",
74
+ "GroupHiscoresEntry",
75
+ "GroupHiscoresSkillItem",
76
+ "GroupMemberFragment",
77
+ "GroupMembership",
78
+ "Group",
79
+ "GroupRole",
80
+ "GroupStatistics",
81
+ "HttpErrorResponse",
82
+ "HttpSuccessResponse",
83
+ "Membership",
84
+ "Metric",
85
+ "NameChangeData",
86
+ "NameChangeDetail",
87
+ "NameChange",
88
+ "NameChangeStatus",
89
+ "Ok",
90
+ "Participation",
91
+ "Period",
92
+ "PlayerAchievementProgress",
93
+ "PlayerBuild",
94
+ "PlayerCompetitionStanding",
95
+ "PlayerMembership",
96
+ "Player",
97
+ "PlayerDetail",
98
+ "PlayerParticipation",
99
+ "PlayerType",
100
+ "Record",
101
+ "RecordLeaderboardEntry",
102
+ "Result",
103
+ "Route",
104
+ "Serializer",
105
+ "Skill",
106
+ "Skills",
107
+ "SnapshotData",
108
+ "Snapshot",
109
+ "StatisticsSnapshot",
110
+ "Team",
111
+ "Top5ProgressResult",
112
+ "UnwrapError",
113
+ "WomError",
114
+ )
115
+
116
+ __packagename__: Final[str] = "wom.py"
117
+ __version__: Final[str] = "0.1.0"
118
+ __author__: Final[str] = "Jonxslays"
119
+ __copyright__: Final[str] = "2023-present Jonxslays"
120
+ __description__: Final[str] = "An asynchronous wrapper for the Wise Old Man API."
121
+ __url__: Final[str] = "https://github.com/Jonxslays/wom.py"
122
+ __docs__: Final[str] = "https://jonxslays.github.io/wom.py"
123
+ __repository__: Final[str] = __url__
124
+ __license__: Final[str] = "MIT"
125
+ __git_sha__: Final[str] = "[d194af2]"
126
+
127
+ from . import client
128
+ from . import constants
129
+ from . import enums
130
+ from . import errors
131
+ from . import models
132
+ from . import result
133
+ from . import routes
134
+ from . import serializer
135
+ from . import services
136
+ from .client import *
137
+ from .enums import *
138
+ from .errors import *
139
+ from .models import *
140
+ from .result import *
141
+ from .routes import *
142
+ from .serializer import *
143
+ from .services import *
@@ -0,0 +1,29 @@
1
+ # wom.py - An asynchronous wrapper for the Wise Old Man API.
2
+ # Copyright (c) 2023-present Jonxslays
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in all
12
+ # copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ # SOFTWARE.
21
+
22
+ """Main module entry point, provides version info and exits."""
23
+
24
+ from __future__ import annotations
25
+
26
+ from wom import _cli
27
+
28
+ if __name__ == "__main__":
29
+ _cli.info()
@@ -0,0 +1,45 @@
1
+ # wom.py - An asynchronous wrapper for the Wise Old Man API.
2
+ # Copyright (c) 2023-present Jonxslays
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
5
+ # of this software and associated documentation files (the "Software"), to deal
6
+ # in the Software without restriction, including without limitation the rights
7
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ # copies of the Software, and to permit persons to whom the Software is
9
+ # furnished to do so, subject to the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be included in all
12
+ # copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20
+ # SOFTWARE.
21
+
22
+ """Provides cli functionality for versioning info."""
23
+
24
+ from __future__ import annotations
25
+
26
+ import platform
27
+ from pathlib import Path
28
+
29
+ from wom import __git_sha__
30
+ from wom import __version__
31
+
32
+
33
+ def info() -> None:
34
+ """Prints package/system info and exits."""
35
+ path = Path(__file__).parent.absolute()
36
+ py_impl = platform.python_implementation()
37
+ py_ver = platform.python_version()
38
+ py_c = platform.python_compiler()
39
+ p = platform.uname()
40
+
41
+ print(f"wom.py v{__version__} from {__git_sha__}")
42
+ print(f"@ {path}")
43
+ print(f"{py_impl} {py_ver} {py_c}")
44
+ print(f"{p.system} {p.node} {p.release} {p.machine}")
45
+ print(p.version)