Allegro OAuth2 Authenticator
A lightweight Python package for handling OAuth2 authentication with the Allegro API.
Features
- Gets authorization code from Allegro
- Exchanges code for access and refresh tokens
- Automatically refreshes expired access tokens
- Validates tokens with Pydantic
- Stores tokens in
tokens.json
Requirements
- Python 3.9+
- Allegro developer account
Installation
pip install allegro_auth
Example Usage
from allegro_auth import AllegroAuth
allegro = AllegroAuth(
client_id="your_client_id",
client_secret="your_client_secret",
redirect_uri="your_redirect_uri"
)
token = allegro.authenticate()
On first run, you'll be prompted to open a URL and paste the authorization code.
Token Storage
Tokens are stored in a local tokens.json file and automatically refreshed when expired.
Location follows OS conventions via platformdirs:
License
This project is licensed under the MIT License.
Links
Metadata
Release files for allegro-auth 2.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| allegro_auth-2.2.0.tar.gz | 4.7 kB | Without provenance | Details for allegro_auth-2.2.0.tar.gz |
Release files / allegro_auth-2.2.0.tar.gz
| Download URL | allegro_auth-2.2.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4064407300a8653318ce51826cb5d0dda9c9efefbc97501df9ea0d25e5b673f0
|
|
BLAKE2b-256 checksum How to use checksums |
9f67abfb379a635bfb9ced592073dc62736ea9255172f7271ee138e7e641f4f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.1
|
Security for allegro-auth 2.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.