https://github.com/retroachievements/api-python
https://github.com/retroachievements/api-python
achievements python retroachievements retroachievements-api
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/retroachievements/api-python
- Owner: RetroAchievements
- License: mit
- Created: 2024-02-25T13:43:52.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-19T01:16:12.000Z (almost 2 years ago)
- Last Synced: 2025-08-31T07:34:03.199Z (10 months ago)
- Topics: achievements, python, retroachievements, retroachievements-api
- Language: Python
- Homepage: https://api-docs.retroachievements.org
- Size: 4.88 KB
- Stars: 5
- Watchers: 3
- Forks: 5
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
retroachievements-api
A Python library that lets you get achievement, user, and game data from RetroAchievements.
## Status
This library is currently a work in progress, endpoint and test coverage can be found below:
ℹ️ Endpoint coverage: 8 of 30
ℹ️ Test coverage: 0 of 30
## Features
✅ Officially-supported, aligns 1:1 with the RAWeb API.
✅ Backwards-compatible, easy migration path to API v2.
✅ Supports Python 3.11+.
## Documentation
Learn how to authenticate and start pulling data from RetroAchievements on our documentation website.
- [Get started](https://api-docs.retroachievements.org/getting-started.html)
- [Get a user's profile information](https://api-docs.retroachievements.org/v1/users/get-user-summary.html)
- [Look up games a user has completed](https://api-docs.retroachievements.org/v1/users/get-user-completed-games.html)
- [Get a game's metadata](https://api-docs.retroachievements.org/v1/games/get-game-extended.html)
## Installation
Coming Soon
## How to begin making API calls
To use any endpoint function in the API, you must first be authorized by RetroAchievements. Fortunately, this is a fairly straightforward process.
1. Visit [your control panel](https://retroachievements.org/controlpanel.php) on the RA website.
2. Find the "Keys" section on the page. Copy the web API key value. **Do not expose your API key anywhere publicly.**
3. You can now create your authorization object using your web API key.
```python
from retroachievements import RAClient
userName = ''
webApiKey = ''
auth = RAClient(userName, webApiKey)
```
4. You now have all you need to use any function in the API. Each function takes this authorization object as its first argument. Here's an example:
```python
from retroachievements import getGame
// This returns basic metadata about the game on this page:
// https://retroachievements.org/game/14402
game = auth.getGame(14402);
```
## Contributing
See [Contribution Guidelines](CONTRIBUTING.md) and [Code of Conduct](CODE_OF_CONDUCT.md).
## Security Vulnerabilities
Please review [our security policy](../../security/policy).
## Credits
- [All Contributors](../../contributors)
## License
MIT License (MIT). See [License File](LICENSE.md).