No project description provided
Project description
SPARTA Twitter API
Welcome to the official GitHub repository for the SPARTA Twitter API, a powerful Python implementation to interact with Twitter's API v2 in a robust and efficient manner.
🚀 Features
- Methods for gathering tweets, users and more.
- Asynchronous API calls support.
- Efficient error handling and rate limit management.
- Comprehensive documentation with usage examples.
📦 Installation
We recommend using Poetry for managing the project dependencies. If you don't have Poetry installed, check their official documentation for guidance.
To install the SPARTA Twitter API via Poetry:
poetry add sparta-twitterapi
or to install it via pip:
pip3 install sparta-twitterapi
📝 Quick Start
Here's a simple example to get you started:
import os
os.environ["BEARER_TOKEN"] = "XXXXXXXXXXXXXX"
from sparta.twitterapi.tweets.tweets import get_tweets_by_id
async for tweet_response in get_tweets_by_id(['1511275800758300675', '1546866845180887040']):
print(tweet_response.tweet)
For in-depth methods and examples, consult our official documentation.
🛠 Development & Contribution
Clone the Repo:
git clone https://github.com/UnibwSparta/twitterapi.git
cd twitterapi
Install Dependencies:
poetry install
Submit Your Changes: Make your improvements and propose a Pull Request!
🧪 Testing
Tests are powered by pytest. Execute tests with:
poetry run pytest tests/
❓ Support & Feedback
Issues? Feedback? Use the GitHub issue tracker.
📜 License
MIT License. View LICENSE for details.
Create twitter spec
Install datamodel-code-generator
pip3 install datamodel-code-generator
datamodel-codegen --input openapi.json --input-file-type openapi --output model.py --output-model-type pydantic_v2.BaseModel --collapse-root-models --use-double-quotes
Project SPARTA
SPARTA is an interdisciplinary research project at the UniBw M. The Chair of Political Science is responsible for managing the project. The project is funded by dtec.bw (Digitalization and Technology Research Center of the Bundeswehr). dtec.bw is funded by the European Union - NextGenerationEU.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file sparta_twitterapi-0.1.59.tar.gz
.
File metadata
- Download URL: sparta_twitterapi-0.1.59.tar.gz
- Upload date:
- Size: 31.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0368d6357a45fe888a3279c24781e895d6384dca0b816fffed8c5d896f2291d |
|
MD5 | 4a6bd7ae5df08bd2126c9b102232d927 |
|
BLAKE2b-256 | 7f761d082f9aebe455daaefa83abcc9822cfbc7f9ee760ae1a9e48cec5bb7a93 |
File details
Details for the file sparta_twitterapi-0.1.59-py3-none-any.whl
.
File metadata
- Download URL: sparta_twitterapi-0.1.59-py3-none-any.whl
- Upload date:
- Size: 44.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dedf65ae60a04b7b12f2d167d1c198b4daa706a73243c10309e11415dd5da39 |
|
MD5 | dcaf831004da7d3a7c996efefd9f4475 |
|
BLAKE2b-256 | 6098184d8e3ec6231e5aa7a5e4fb623747888b958ced0a3c80dd6c67c73a011a |