Python bindings to automate requestrepo.com
Project description
requestrepo Python client
Python bindings to automate requestrepo.com
Installation
pip install requestrepo
Basic Usage
- Instantiate the
Requestrepoclass:
from requestrepo import Requestrepo # Requestrepo, RequestRepo and requestrepo are accepted imports
client = Requestrepo() # if token is not provided via the constructor or REQUESTREPO_TOKEN environment variable, a new one will be generated and printed to stderr
client = Requestrepo("your-token-here")
or
REQUESTREPO_TOKEN=token python your_script.py
Examples
Example 1: Async request retrieval via on_request
from requestrepo import Requestrepo
def on_request(request_data: dict):
print("New Request Received:", request_data)
client = Requestrepo(token="your-token-here")
client.await_requests()
Example 2: Synchronous request retrieval
from requestrepo import Requestrepo
client = Requestrepo(token="your_api_token")
# Get the latest request (blocks until one is received)
new_request = client.get_request()
print("Latest Request:", new_request)
Contributing
Contributions are welcome! Please submit a pull request or open an issue if you have any ideas or suggestions.
License
MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file requestrepo-0.0.1.tar.gz.
File metadata
- Download URL: requestrepo-0.0.1.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
14797772f6d8e165c47bc250f30cc62e0340144feba57a364e2148ba534d4acc
|
|
| MD5 |
d08bb9a0afe4301e4f3b499735d2921a
|
|
| BLAKE2b-256 |
9d81139c85348593738ad7eae13aa87c21f3cc999c5b69681431d18e700d7e79
|
File details
Details for the file requestrepo-0.0.1-py3-none-any.whl.
File metadata
- Download URL: requestrepo-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5c0761910ac0355e1a196069dafd089f495af852960220e453904f2def385463
|
|
| MD5 |
a5a24212d574181d801ad71ad9d43cbf
|
|
| BLAKE2b-256 |
23b74bcc0b473d52ef5d1084396521d9ab67b200d95bc0cb20de541409999ba2
|