Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (16.7%) to scientific vocabulary
Keywords
Repository
Python implementation of Twitter API v2
Basic Info
- Host: GitHub
- Owner: UnibwSparta
- License: mit
- Language: Python
- Default Branch: main
- Homepage: https://unibwsparta.github.io/twitterapi/
- Size: 6.28 MB
Statistics
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 13
Topics
Metadata Files
README.md
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:
bash
poetry add sparta-twitterapi
or to install it via pip:
bash
pip3 install sparta-twitterapi
📝 Quick Start
Here's a simple example to get you started:
```python import os os.environ["BEARERTOKEN"] = "XXXXXXXXXXXXXX" from sparta.twitterapi.tweets.tweets import gettweetsbyid
async for tweetresponse in gettweetsbyid(['1511275800758300675', '1546866845180887040']): print(tweet_response.tweet) ```
For in-depth methods and examples, consult our official documentation.
🛠 Development & Contribution
Clone the Repo:
bash
git clone https://github.com/UnibwSparta/twitterapi.git
cd twitterapi
Install Dependencies:
bash
poetry install
Submit Your Changes: Make your improvements and propose a Pull Request!
🧪 Testing
Tests are powered by pytest. Execute tests with:
bash
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
bash
pip3 install datamodel-code-generator
Download the OpenAPI spec
bash
wget https://api.twitter.com/2/openapi.json
Create the model and make the manual changes that are described at the top of models/twitter_v2_spec.py
bash
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.
Owner
- Login: UnibwSparta
- Kind: user
- Repositories: 1
- Profile: https://github.com/UnibwSparta
Citation (CITATION.cff)
cff-version: 1.2.0 message: "If you use this software, please cite it as below." authors: - family-names: "Neumeier" given-names: "Andreas" - family-names: "Riedl" given-names: "Jasmin" orcid: "https://orcid.org/0000-0002-4888-7689" title: "sparta-twitterapi" version: 0.1.0 date-released: 2023-08-10 url: "https://github.com/UnibwSparta/twitterapi"
GitHub Events
Total
- Create event: 10
- Issues event: 2
- Release event: 5
- Delete event: 6
- Issue comment event: 1
- Push event: 15
- Pull request review event: 3
- Pull request event: 9
Last Year
- Create event: 10
- Issues event: 2
- Release event: 5
- Delete event: 6
- Issue comment event: 1
- Push event: 15
- Pull request review event: 3
- Pull request event: 9
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 2
- Average time to close issues: 4 days
- Average time to close pull requests: 9 minutes
- Total issue authors: 1
- Total pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 1
- Pull requests: 2
- Average time to close issues: 4 days
- Average time to close pull requests: 9 minutes
- Issue authors: 1
- Pull request authors: 1
- Average comments per issue: 1.0
- Average comments per pull request: 0.0
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- agrizzli (1)
Pull Request Authors
- anneum (6)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- actions/checkout v3 composite
- actions/setup-python v4 composite
- peaceiris/actions-gh-pages v3 composite
- snok/install-poetry v1 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- snok/install-poetry v1 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- pypa/gh-action-pypi-publish release/v1 composite
- snok/install-poetry v1 composite
- actions/cache v3 composite
- actions/checkout v3 composite
- actions/setup-python v4 composite
- snok/install-poetry v1 composite
- aiohttp ^3.8.5
- asyncio ^3.4.3
- pydantic ^2.1.1
- python ^3.8.10
- requests ^2.31.0