marqetive-lib 0.1.0__py3-none-any.whl

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 (43) hide show
  1. marqetive/__init__.py +113 -0
  2. marqetive/core/__init__.py +5 -0
  3. marqetive/core/account_factory.py +212 -0
  4. marqetive/core/base_manager.py +303 -0
  5. marqetive/core/client.py +108 -0
  6. marqetive/core/progress.py +291 -0
  7. marqetive/core/registry.py +257 -0
  8. marqetive/platforms/__init__.py +55 -0
  9. marqetive/platforms/base.py +390 -0
  10. marqetive/platforms/exceptions.py +238 -0
  11. marqetive/platforms/instagram/__init__.py +7 -0
  12. marqetive/platforms/instagram/client.py +786 -0
  13. marqetive/platforms/instagram/exceptions.py +311 -0
  14. marqetive/platforms/instagram/factory.py +106 -0
  15. marqetive/platforms/instagram/manager.py +112 -0
  16. marqetive/platforms/instagram/media.py +669 -0
  17. marqetive/platforms/linkedin/__init__.py +7 -0
  18. marqetive/platforms/linkedin/client.py +733 -0
  19. marqetive/platforms/linkedin/exceptions.py +335 -0
  20. marqetive/platforms/linkedin/factory.py +130 -0
  21. marqetive/platforms/linkedin/manager.py +119 -0
  22. marqetive/platforms/linkedin/media.py +549 -0
  23. marqetive/platforms/models.py +345 -0
  24. marqetive/platforms/tiktok/__init__.py +0 -0
  25. marqetive/platforms/twitter/__init__.py +7 -0
  26. marqetive/platforms/twitter/client.py +647 -0
  27. marqetive/platforms/twitter/exceptions.py +311 -0
  28. marqetive/platforms/twitter/factory.py +151 -0
  29. marqetive/platforms/twitter/manager.py +121 -0
  30. marqetive/platforms/twitter/media.py +779 -0
  31. marqetive/platforms/twitter/threads.py +442 -0
  32. marqetive/py.typed +0 -0
  33. marqetive/registry_init.py +66 -0
  34. marqetive/utils/__init__.py +45 -0
  35. marqetive/utils/file_handlers.py +438 -0
  36. marqetive/utils/helpers.py +99 -0
  37. marqetive/utils/media.py +399 -0
  38. marqetive/utils/oauth.py +265 -0
  39. marqetive/utils/retry.py +239 -0
  40. marqetive/utils/token_validator.py +240 -0
  41. marqetive_lib-0.1.0.dist-info/METADATA +261 -0
  42. marqetive_lib-0.1.0.dist-info/RECORD +43 -0
  43. marqetive_lib-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,261 @@
1
+ Metadata-Version: 2.4
2
+ Name: marqetive-lib
3
+ Version: 0.1.0
4
+ Summary: Modern Python utilities for web APIs
5
+ Keywords: api,utilities,web,http,marqetive
6
+ Requires-Python: >=3.12
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Topic :: Internet :: WWW/HTTP
14
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
+ Provides-Extra: dev
16
+ Provides-Extra: docs
17
+ Requires-Dist: aiofiles (>=24.0.0)
18
+ Requires-Dist: httpx (>=0.28.1)
19
+ Requires-Dist: mkdocs (>=1.5.0) ; extra == "docs"
20
+ Requires-Dist: mkdocs-material (>=9.5.0) ; extra == "docs"
21
+ Requires-Dist: mkdocstrings[python] (>=0.30.1) ; extra == "docs"
22
+ Requires-Dist: pydantic (>=2.0.0)
23
+ Requires-Dist: pyright (>=1.1.0) ; extra == "dev"
24
+ Requires-Dist: pytest (>=9.0.0) ; extra == "dev"
25
+ Requires-Dist: pytest-asyncio (>=1.3.0) ; extra == "dev"
26
+ Requires-Dist: pytest-cov (>=7.0.0) ; extra == "dev"
27
+ Requires-Dist: ruff (>=0.14.4) ; extra == "dev"
28
+ Requires-Dist: tweepy (>=4.16.0,<5.0.0)
29
+ Project-URL: Documentation, https://marqetive-lib.readthedocs.io
30
+ Project-URL: Homepage, https://github.com/yourusername/marqetive-lib
31
+ Project-URL: Issues, https://github.com/yourusername/marqetive-lib/issues
32
+ Project-URL: Repository, https://github.com/yourusername/marqetive-lib
33
+ Description-Content-Type: text/markdown
34
+
35
+ # MarqetiveLib
36
+
37
+ [![CI](https://github.com/yourusername/marqetive-lib/workflows/CI/badge.svg)](https://github.com/yourusername/marqetive-lib/actions)
38
+ [![codecov](https://codecov.io/gh/yourusername/marqetive-lib/branch/main/graph/badge.svg)](https://codecov.io/gh/yourusername/marqetive-lib)
39
+ [![PyPI version](https://badge.fury.io/py/marqetive-lib.svg)](https://badge.fury.io/py/marqetive-lib)
40
+ [![Python versions](https://img.shields.io/pypi/pyversions/marqetive-lib.svg)](https://pypi.org/project/marqetive-lib/)
41
+ [![License](https://img.shields.io/github/license/yourusername/marqetive-lib.svg)](https://github.com/yourusername/marqetive-lib/blob/main/LICENSE)
42
+ [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://marqetive-lib.readthedocs.io)
43
+
44
+ Modern Python utilities for web APIs - Simple, type-safe, and async-ready.
45
+
46
+ ## Features
47
+
48
+ - **๐Ÿš€ Fast and Lightweight**: Built on httpx with minimal dependencies
49
+ - **๐Ÿ”’ Type-Safe**: Full type hints and Pyright compliance for better IDE support
50
+ - **๐Ÿ“ฆ Zero Learning Curve**: Intuitive API design that feels natural
51
+ - **๐Ÿงช Well Tested**: Comprehensive test coverage (>90%)
52
+ - **๐Ÿ“š Excellent Documentation**: Clear examples and detailed API reference
53
+ - **๐Ÿ”„ Async/Await Support**: Built for modern async Python applications
54
+ - **โœจ Developer Friendly**: Great error messages and helpful utilities
55
+
56
+ ## Installation
57
+
58
+ ```bash
59
+ pip install marqetive-lib
60
+ ```
61
+
62
+ Or with Poetry:
63
+
64
+ ```bash
65
+ poetry add marqetive-lib
66
+ ```
67
+
68
+ ## Quick Start
69
+
70
+ ```python
71
+ import asyncio
72
+ from marqetive_lib import APIClient
73
+
74
+ async def main():
75
+ async with APIClient(base_url="https://api.example.com") as client:
76
+ # Make a GET request
77
+ response = await client.get("/users/1")
78
+ print(f"User: {response.data['name']}")
79
+
80
+ # Make a POST request
81
+ new_user = {"name": "John Doe", "email": "john@example.com"}
82
+ response = await client.post("/users", data=new_user)
83
+ print(f"Created user ID: {response.data['id']}")
84
+
85
+ asyncio.run(main())
86
+ ```
87
+
88
+ ## Core Features
89
+
90
+ ### Simple HTTP Client
91
+
92
+ ```python
93
+ from marqetive_lib import APIClient
94
+
95
+ async with APIClient(base_url="https://api.example.com") as client:
96
+ # GET request with query parameters
97
+ response = await client.get("/search", params={"q": "python"})
98
+
99
+ # POST request with JSON body
100
+ response = await client.post("/users", data={"name": "Alice"})
101
+
102
+ # Access response details
103
+ print(response.status_code) # 200
104
+ print(response.data) # Parsed JSON response
105
+ print(response.headers) # Response headers
106
+ ```
107
+
108
+ ### Utility Functions
109
+
110
+ ```python
111
+ from marqetive_lib.utils import (
112
+ format_response,
113
+ parse_query_params,
114
+ build_query_string,
115
+ merge_headers
116
+ )
117
+
118
+ # Format JSON responses beautifully
119
+ data = {"users": [{"id": 1, "name": "Alice"}]}
120
+ print(format_response(data, pretty=True, indent=2))
121
+
122
+ # Parse URL query parameters
123
+ params = parse_query_params("https://api.com/search?q=python&page=1")
124
+ # {'q': ['python'], 'page': ['1']}
125
+
126
+ # Build query strings
127
+ query = build_query_string({"search": "api", "limit": 10})
128
+ # "search=api&limit=10"
129
+
130
+ # Merge HTTP headers
131
+ headers = merge_headers(
132
+ {"Content-Type": "application/json"},
133
+ {"Authorization": "Bearer token"}
134
+ )
135
+ ```
136
+
137
+ ### Type-Safe Responses
138
+
139
+ ```python
140
+ from marqetive_lib import APIClient
141
+ from pydantic import BaseModel
142
+
143
+ class User(BaseModel):
144
+ id: int
145
+ name: str
146
+ email: str
147
+
148
+ async with APIClient(base_url="https://api.example.com") as client:
149
+ response = await client.get("/users/1")
150
+ user = User(**response.data) # Automatic validation
151
+ print(user.name)
152
+ ```
153
+
154
+ ## Documentation
155
+
156
+ Full documentation is available at [marqetive-lib.readthedocs.io](https://marqetive-lib.readthedocs.io)
157
+
158
+ - [Getting Started Guide](https://marqetive-lib.readthedocs.io/getting-started/)
159
+ - [API Reference](https://marqetive-lib.readthedocs.io/api/core/)
160
+ - [Examples](https://marqetive-lib.readthedocs.io/examples/basic/)
161
+ - [Contributing Guide](https://marqetive-lib.readthedocs.io/contributing/)
162
+
163
+ ## Requirements
164
+
165
+ - Python 3.9+
166
+ - httpx >= 0.27.0
167
+ - pydantic >= 2.0.0
168
+
169
+ ## Development
170
+
171
+ ### Setup Development Environment
172
+
173
+ ```bash
174
+ # Clone the repository
175
+ git clone https://github.com/yourusername/marqetive-lib.git
176
+ cd marqetive-lib
177
+
178
+ # Install Poetry if you haven't already
179
+ curl -sSL https://install.python-poetry.org | python3 -
180
+
181
+ # Install dependencies
182
+ poetry install --with dev,docs
183
+
184
+ # Activate virtual environment
185
+ poetry shell
186
+ ```
187
+
188
+ ### Running Tests
189
+
190
+ ```bash
191
+ # Run tests
192
+ poetry run pytest
193
+
194
+ # Run tests with coverage
195
+ poetry run pytest --cov=src/marqetive_lib --cov-report=term-missing
196
+
197
+ # Run tests for specific Python versions
198
+ poetry run tox
199
+ ```
200
+
201
+ ### Code Quality
202
+
203
+ ```bash
204
+ # Lint code with Ruff
205
+ poetry run ruff check .
206
+
207
+ # Format code with Ruff
208
+ poetry run ruff format .
209
+
210
+ # Type check with Pyright
211
+ poetry run pyright src/
212
+ ```
213
+
214
+ ### Building Documentation
215
+
216
+ ```bash
217
+ # Serve documentation locally with live reload
218
+ poetry run mkdocs serve
219
+
220
+ # Build static documentation
221
+ poetry run mkdocs build
222
+ ```
223
+
224
+ ## Contributing
225
+
226
+ Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on:
227
+
228
+ - Code of conduct
229
+ - Development workflow
230
+ - Code style guidelines
231
+ - Testing requirements
232
+ - Pull request process
233
+
234
+ ## Changelog
235
+
236
+ See [CHANGELOG.md](CHANGELOG.md) for a list of changes in each release.
237
+
238
+ ## License
239
+
240
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
241
+
242
+ ## Acknowledgments
243
+
244
+ - Built with [httpx](https://www.python-httpx.org/) for HTTP requests
245
+ - Uses [Pydantic](https://docs.pydantic.dev/) for data validation
246
+ - Tested with [pytest](https://pytest.org/)
247
+ - Documentation powered by [MkDocs Material](https://squidfunk.github.io/mkdocs-material/)
248
+
249
+ ## Support
250
+
251
+ - **Documentation**: [marqetive-lib.readthedocs.io](https://marqetive-lib.readthedocs.io)
252
+ - **Issues**: [GitHub Issues](https://github.com/yourusername/marqetive-lib/issues)
253
+ - **Discussions**: [GitHub Discussions](https://github.com/yourusername/marqetive-lib/discussions)
254
+
255
+ ## Links
256
+
257
+ - **PyPI**: [pypi.org/project/marqetive-lib](https://pypi.org/project/marqetive-lib/)
258
+ - **Source Code**: [github.com/yourusername/marqetive-lib](https://github.com/yourusername/marqetive-lib)
259
+ - **Documentation**: [marqetive-lib.readthedocs.io](https://marqetive-lib.readthedocs.io)
260
+ - **Changelog**: [CHANGELOG.md](CHANGELOG.md)
261
+
@@ -0,0 +1,43 @@
1
+ marqetive/__init__.py,sha256=o5Ntw1dibTu5LKbhtSe1XfNxmHIeOOdyvZ2lQMxt_Ok,3106
2
+ marqetive/core/__init__.py,sha256=qOC6JhGjWOpj9_7umtc6VGH16ZJZE6iNDhA6iDZm8kg,113
3
+ marqetive/core/account_factory.py,sha256=3PrkWPdeUS8K8yaMufCsc-mhNN8k_9oDUo_ltnkMSPY,7145
4
+ marqetive/core/base_manager.py,sha256=tbuwO2QQaSup_UXMCtmETcNutzCFV0omvroUM7yHFKA,10031
5
+ marqetive/core/client.py,sha256=GBgWzkgdMRMyoCy5dXdEFFzPne6Usp_9i0UxaG7Xd-Y,3226
6
+ marqetive/core/progress.py,sha256=5Vyksf8YfQUVRudwDEuegcxoc0js5qbHM2SFZ6VLxHM,8593
7
+ marqetive/core/registry.py,sha256=6BBY30qgQBUWf2av73S4E2hEx0uqM7HFn_AGPfCv3KU,8080
8
+ marqetive/platforms/__init__.py,sha256=2rC_xqx0Xf0LJy87GcFUpQe5DeMg-cgYEI5Uv6uoM54,1339
9
+ marqetive/platforms/base.py,sha256=y37RkSb3AGHtU-JmjxlUgbwlqG2MmF7w4MI3FATHoG4,11945
10
+ marqetive/platforms/exceptions.py,sha256=C8H0vsICM6amtQTz1iwXjc3duFGq-M71N7QqsLElt1M,7029
11
+ marqetive/platforms/instagram/__init__.py,sha256=dFrDIyKGdw8AsRRYb_AjW1R8PWkxqytM-nrjuAvbw0A,331
12
+ marqetive/platforms/instagram/client.py,sha256=XuvWl0aRHdAFScjOf4x4reQWkfZXdtGKmh1lIWcj4Lc,24939
13
+ marqetive/platforms/instagram/exceptions.py,sha256=zwTc90VbG8uz_6O5bKw68Pp53SoevLQUqPiXj4ZgThU,8983
14
+ marqetive/platforms/instagram/factory.py,sha256=qo7kLk7IoVWGjB0hJbkQqesOveN4gidw0kUh_7SzvaM,3533
15
+ marqetive/platforms/instagram/manager.py,sha256=ZCqdlz5DgOhKUb1n2WOviLsr4NQxfBT4KiycSRv3Q-4,3714
16
+ marqetive/platforms/instagram/media.py,sha256=JDRFB66UlhSjAf0PFR3raGqYxtNTSd5yIZ_2xTGmZRk,21166
17
+ marqetive/platforms/linkedin/__init__.py,sha256=r-1p9yaJO4n8wYWNtN32Quwar6eAWkF5EtFN-v2AdPg,321
18
+ marqetive/platforms/linkedin/client.py,sha256=ddcKmVN2d0ow2abfnaNSeswRsoYREdxj-J9w711zsy0,23558
19
+ marqetive/platforms/linkedin/exceptions.py,sha256=WHjMZ-XJnKgT6uzzi7LXqFt4lD7nSCjzMzaqtOQA3hM,9767
20
+ marqetive/platforms/linkedin/factory.py,sha256=N8POv4vMSg1L8PYnV9-JpHgYlaa33AfeWUhh6UPkViI,4516
21
+ marqetive/platforms/linkedin/manager.py,sha256=K_X74qenJyd5HIL3KtsKpHjQOz48uENFJabZdsXwE-Y,3984
22
+ marqetive/platforms/linkedin/media.py,sha256=360OT1sdBuJRjuL3wJ-T1irAX5gHmcf4AwAU__cvwwA,16901
23
+ marqetive/platforms/models.py,sha256=8NSIh-fT5gFHCvs6A5dnnsfhsklpSfNgD_ovDPVv1aY,10860
24
+ marqetive/platforms/tiktok/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
+ marqetive/platforms/twitter/__init__.py,sha256=zDEslH3Y6zCnFlYaoW77bkO7j75OmABjqMf1BGh8P5M,313
26
+ marqetive/platforms/twitter/client.py,sha256=vHaYYFNCUJJuOykmiEYBge2CM_kYqKwGdptdqGJE5Ic,20820
27
+ marqetive/platforms/twitter/exceptions.py,sha256=aKrjUZL07KWQ8hatj5-U7UfnSTl-n8DnTgGGigYCrIY,8931
28
+ marqetive/platforms/twitter/factory.py,sha256=JzcNaNfbi2s6BA7r4_vwpWbUpzIUMrtYSvvWY30R2O0,5266
29
+ marqetive/platforms/twitter/manager.py,sha256=QlPrVniPbJdlt39iMi_hmDGpaMkPT7pNjjIYUre2byY,4092
30
+ marqetive/platforms/twitter/media.py,sha256=16atvKwSukvK_YC_gIm2qsl3pmidWEBAwIfJBPG9HQo,24968
31
+ marqetive/platforms/twitter/threads.py,sha256=xksMvYD__Cr5ZCH70nHEp1UQe_2xtOknCOcPWjhtPsw,14764
32
+ marqetive/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ marqetive/registry_init.py,sha256=KuahtT6SZPeGReFHZznkeKCLctd_TrpwJUoCQ_igXL8,2035
34
+ marqetive/utils/__init__.py,sha256=bSrNajbxYBSKQayrPviLz8JeGjplnyK8y_NGDtgb7yQ,977
35
+ marqetive/utils/file_handlers.py,sha256=4TP5kmWofNTSZmlS683CM1UYP83WvRd_NubMbqtXv-g,12568
36
+ marqetive/utils/helpers.py,sha256=8-ljhL47SremKcQO2GF8DIHOPODEv1rSioVNuSPCbec,2634
37
+ marqetive/utils/media.py,sha256=Rvxw9XKU65n-z4G1bEihG3wXZBmjSDZUqClfjGFrg6k,12013
38
+ marqetive/utils/oauth.py,sha256=6X8FrF4bDVqX-Jf7dAgzdUCR7zqdbAM4FjjBEGXNoaE,7913
39
+ marqetive/utils/retry.py,sha256=lAniJLMNWp9XsHrvU0XBNifpNEjfde4MGfd5hlFTPfA,7636
40
+ marqetive/utils/token_validator.py,sha256=pNimFr_FNJLcYGV5oADhoBjflKfEbLQ3Epwnwg_nTbg,6703
41
+ marqetive_lib-0.1.0.dist-info/METADATA,sha256=zW6nD-GCt2z5LtWPMmhydFTvFM3ddTMSMN2gfL8ipcw,7849
42
+ marqetive_lib-0.1.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
43
+ marqetive_lib-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: poetry-core 2.2.1
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any