mc5-api-client 1.0.2__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 (37) hide show
  1. mc5_api_client-1.0.2/.gitignore +200 -0
  2. mc5_api_client-1.0.2/CHANGELOG.md +97 -0
  3. mc5_api_client-1.0.2/LICENSE +21 -0
  4. mc5_api_client-1.0.2/MANIFEST.in +18 -0
  5. mc5_api_client-1.0.2/PKG-INFO +1129 -0
  6. mc5_api_client-1.0.2/README.md +1070 -0
  7. mc5_api_client-1.0.2/examples/basic_usage.py +114 -0
  8. mc5_api_client-1.0.2/examples/clan_management.py +183 -0
  9. mc5_api_client-1.0.2/examples/clan_management_complete.py +264 -0
  10. mc5_api_client-1.0.2/examples/events_and_tasks.py +293 -0
  11. mc5_api_client-1.0.2/examples/message_management.py +222 -0
  12. mc5_api_client-1.0.2/examples/private_messaging.py +220 -0
  13. mc5_api_client-1.0.2/examples/squad_management.py +218 -0
  14. mc5_api_client-1.0.2/examples/squad_wall_management.py +296 -0
  15. mc5_api_client-1.0.2/pyproject.toml +174 -0
  16. mc5_api_client-1.0.2/pytest.ini +16 -0
  17. mc5_api_client-1.0.2/requirements-dev.txt +25 -0
  18. mc5_api_client-1.0.2/requirements.txt +7 -0
  19. mc5_api_client-1.0.2/setup.cfg +4 -0
  20. mc5_api_client-1.0.2/setup.py +118 -0
  21. mc5_api_client-1.0.2/src/mc5_api_client/__init__.py +31 -0
  22. mc5_api_client-1.0.2/src/mc5_api_client/auth.py +281 -0
  23. mc5_api_client-1.0.2/src/mc5_api_client/cli.py +463 -0
  24. mc5_api_client-1.0.2/src/mc5_api_client/client.py +1220 -0
  25. mc5_api_client-1.0.2/src/mc5_api_client/exceptions.py +78 -0
  26. mc5_api_client-1.0.2/src/mc5_api_client/py.typed +0 -0
  27. mc5_api_client-1.0.2/src/mc5_api_client.egg-info/PKG-INFO +1129 -0
  28. mc5_api_client-1.0.2/src/mc5_api_client.egg-info/SOURCES.txt +35 -0
  29. mc5_api_client-1.0.2/src/mc5_api_client.egg-info/dependency_links.txt +1 -0
  30. mc5_api_client-1.0.2/src/mc5_api_client.egg-info/entry_points.txt +2 -0
  31. mc5_api_client-1.0.2/src/mc5_api_client.egg-info/not-zip-safe +1 -0
  32. mc5_api_client-1.0.2/src/mc5_api_client.egg-info/requires.txt +26 -0
  33. mc5_api_client-1.0.2/src/mc5_api_client.egg-info/top_level.txt +1 -0
  34. mc5_api_client-1.0.2/tests/__init__.py +10 -0
  35. mc5_api_client-1.0.2/tests/test_auth.py +230 -0
  36. mc5_api_client-1.0.2/tests/test_cli.py +355 -0
  37. mc5_api_client-1.0.2/tests/test_client.py +296 -0
@@ -0,0 +1,200 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ # Usually these files are written by a python script from a template
31
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
32
+ *.manifest
33
+ *.spec
34
+
35
+ # Installer logs
36
+ pip-log.txt
37
+ pip-delete-this-directory.txt
38
+
39
+ # Unit test / coverage reports
40
+ htmlcov/
41
+ .tox/
42
+ .nox/
43
+ .coverage
44
+ .coverage.*
45
+ .cache
46
+ nosetests.xml
47
+ coverage.xml
48
+ *.cover
49
+ *.py,cover
50
+ .hypothesis/
51
+ .pytest_cache/
52
+ cover/
53
+
54
+ # Translations
55
+ *.mo
56
+ *.pot
57
+
58
+ # Django stuff:
59
+ *.log
60
+ local_settings.py
61
+ db.sqlite3
62
+ db.sqlite3-journal
63
+
64
+ # Flask stuff:
65
+ instance/
66
+ .webassets-cache
67
+
68
+ # Scrapy stuff:
69
+ .scrapy
70
+
71
+ # Sphinx documentation
72
+ docs/_build/
73
+
74
+ # PyBuilder
75
+ .pybuilder/
76
+ target/
77
+
78
+ # Jupyter Notebook
79
+ .ipynb_checkpoints
80
+
81
+ # IPython
82
+ profile_default/
83
+ ipython_config.py
84
+
85
+ # pyenv
86
+ # For a library or package, you might want to ignore these files since the code is
87
+ # intended to run in multiple environments; otherwise, check them in:
88
+ # .python-version
89
+
90
+ # pipenv
91
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
93
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
94
+ # install all needed dependencies.
95
+ #Pipfile.lock
96
+
97
+ # poetry
98
+ # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
99
+ # This is especially recommended for binary packages to ensure reproducibility, and is more
100
+ # commonly ignored for libraries.
101
+ # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
102
+ #poetry.lock
103
+
104
+ # pdm
105
+ # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
106
+ #pdm.lock
107
+ # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
108
+ # in version control.
109
+ # https://pdm.fming.dev/#use-with-ide
110
+ .pdm.toml
111
+
112
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
113
+ __pypackages__/
114
+
115
+ # Celery stuff
116
+ celerybeat-schedule
117
+ celerybeat.pid
118
+
119
+ # SageMath parsed files
120
+ *.sage.py
121
+
122
+ # Environments
123
+ .env
124
+ .venv
125
+ env/
126
+ venv/
127
+ ENV/
128
+ env.bak/
129
+ venv.bak/
130
+
131
+ # Spyder project settings
132
+ .spyderproject
133
+ .spyproject
134
+
135
+ # Rope project settings
136
+ .ropeproject
137
+
138
+ # mkdocs documentation
139
+ /site
140
+
141
+ # mypy
142
+ .mypy_cache/
143
+ .dmypy.json
144
+ dmypy.json
145
+
146
+ # Pyre type checker
147
+ .pyre/
148
+
149
+ # pytype static type analyzer
150
+ .pytype/
151
+
152
+ # Cython debug symbols
153
+ cython_debug/
154
+
155
+ # PyCharm
156
+ # JetBrains specific template is maintained in a separate JetBrains.gitignore that can
157
+ # be added to the global gitignore or merged into this project gitignore. For a PyCharm
158
+ # project, it is recommended to include the following files in version control:
159
+ # - .idea/modules.xml
160
+ # - .idea/*.iml
161
+ # - .idea/misc.xml
162
+ # - .idea/vcs.xml
163
+ .idea/
164
+
165
+ # VSCode
166
+ .vscode/
167
+ *.code-workspace
168
+
169
+ # Local History for Visual Studio Code
170
+ .history/
171
+
172
+ # Built Visual Studio Code Extensions
173
+ *.vsix
174
+
175
+ # MC5 API Client specific
176
+ .mc5/
177
+ token.json
178
+ config.json
179
+ debug.log
180
+ events.json
181
+ *.token
182
+
183
+ # OS specific
184
+ .DS_Store
185
+ .DS_Store?
186
+ ._*
187
+ .Spotlight-V100
188
+ .Trashes
189
+ ehthumbs.db
190
+ Thumbs.db
191
+
192
+ # Temporary files
193
+ *.tmp
194
+ *.temp
195
+ *.swp
196
+ *.swo
197
+ *~
198
+
199
+ # Log files
200
+ *.log
@@ -0,0 +1,97 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2026-02-02
9
+
10
+ ### Added
11
+ - Initial release of MC5 API Client by Chizoba
12
+ - Comprehensive authentication system with token generation
13
+ - Support for both user and admin authentication
14
+ - Modern CLI interface with Rich formatting and debug capabilities
15
+ - Full API coverage including:
16
+ - Profile management
17
+ - Clan operations
18
+ - Friend management
19
+ - Messaging system
20
+ - Events and tasks
21
+ - Leaderboard access
22
+ - Game configuration
23
+ - Alias and dogtag utilities
24
+ - Automatic token refresh functionality
25
+ - Comprehensive error handling with custom exceptions
26
+ - Type hints throughout the codebase
27
+ - Extensive documentation and examples
28
+ - Unit test coverage
29
+ - PyPI package configuration
30
+ - Development environment setup
31
+ - Python 3.11+ support (beta version)
32
+
33
+ ### Features
34
+ - **Authentication**: Easy token generation and management
35
+ - **CLI**: Rich command-line interface with progress indicators
36
+ - **Auto-refresh**: Automatic token renewal
37
+ - **Error Handling**: Comprehensive exception hierarchy
38
+ - **Type Safety**: Full type annotation support
39
+ - **Documentation**: Detailed README and examples
40
+ - **Testing**: Unit tests with mocking
41
+ - **Configuration**: Persistent config and token storage
42
+
43
+ ### CLI Commands
44
+ - `generate-token` - Generate user access tokens
45
+ - `generate-admin-token` - Generate admin access tokens
46
+ - `validate-token` - Validate saved tokens
47
+ - `show-config` - Display configuration
48
+ - `clear-config` - Clear saved data
49
+
50
+ ### API Endpoints Supported
51
+ - Authentication (Janus)
52
+ - Profile management (Osiris)
53
+ - Clan operations (Osiris)
54
+ - Friend system (Osiris)
55
+ - Messaging (Osiris)
56
+ - Events (Osiris)
57
+ - Leaderboards (Osiris/Olympus)
58
+ - Game objects (Iris)
59
+ - Asset metadata (Iris)
60
+ - Alias lookup (Janus)
61
+
62
+ ### Installation
63
+ ```bash
64
+ pip install mc5-api-client
65
+ ```
66
+
67
+ ### Development Installation
68
+ ```bash
69
+ pip install mc5-api-client[dev]
70
+ ```
71
+
72
+ ### Example Usage
73
+ ```python
74
+ from mc5_api_client import MC5Client
75
+
76
+ with MC5Client(username="user", password="pass") as client:
77
+ profile = client.get_profile()
78
+ events = client.get_events()
79
+ client.send_private_message("target", "Hello!")
80
+ ```
81
+
82
+ ### CLI Usage
83
+ ```bash
84
+ mc5 generate-token --username "user" --password "pass" --save
85
+ mc5 validate-token
86
+ mc5 show-config
87
+ ```
88
+
89
+ ---
90
+
91
+ ## [Unreleased]
92
+
93
+ ### Planned
94
+ - Additional API endpoints
95
+ - Enhanced CLI features
96
+ - Performance optimizations
97
+ - More examples and tutorials
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Chizoba
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.
@@ -0,0 +1,18 @@
1
+ include README.md
2
+ include LICENSE
3
+ include CHANGELOG.md
4
+ include requirements.txt
5
+ include requirements-dev.txt
6
+ include pyproject.toml
7
+ include setup.py
8
+ include pytest.ini
9
+ include .gitignore
10
+ recursive-include src *.py
11
+ recursive-include src *.pyi
12
+ recursive-include src *.typed
13
+ recursive-include tests *.py
14
+ recursive-include examples *.py
15
+ recursive-exclude * __pycache__
16
+ recursive-exclude * *.py[co]
17
+ recursive-exclude * .DS_Store
18
+ recursive-exclude * *.so