RestClientMicro
Run REST calls
Usage
from rest_client_micro import RESTClient as rc
from rest_client_micro import RESTObject as ro
rest_object = ro()
rest_object.endpoint = 'https://api.scryfall.com/cards/named'
rest_object.params = {'exact':'Overgrown Tomb'}
rest_client = rc()
result = rest_client.execute(rest_object)
print(result)
e.g
runs a Magic the Gathering card search against the exact name 'Overgrown Tomb'.
Returns the content of the response
{
'error': False,
'response':"{\"object\":\"card\",\"id\":\"eff1f52c-5c43-4260-aaa0-6920846a191c\",\"oracle_id\":\"975ec9a3-6f20-4177-8211-82526e092538\",\"multiverse_ids\":[453003],\"mtgo_id\":69919,\"arena_id\":68734,\"tcgplayer_id\":175196,\"cardmarket_id\":363554,\"name\":\"Overgrown Tomb\",.....ll\"}}"
}
Or an object describing an error
{
"error":True,
"description":"Resource not found"
}
or
{
"error":True,
"description":"Unterminated string starting at: line 1 column 14 (char 13)"
}
Auth
from rest_client_micro import RESTClient as rc, RESTObject as ro, BasicAuth as ba
rest_object = ro()
rest_object.endpoint = 'http://localhost:3876/auth'
rest_object.params = ''
rest_object.basic_auth = ba('user', 'secretpass')
rest_client = rc()
result = rest_client.execute(config=rest_object)
Build
python -m build
python -m twine upload dist/*
Metadata
Release files for rest-client-micro 0.3.22
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 | |
|---|---|---|---|---|
| rest_client_micro-0.3.22.tar.gz | 7.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rest_client_micro-0.3.22-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.2 kB
Release files / rest_client_micro-0.3.22.tar.gz
| Download URL | rest_client_micro-0.3.22.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
400944df6cf6020c5d2c0a953d90b6c665bae89de03c50b87908fba6beba79d6
|
|
BLAKE2b-256 checksum How to use checksums |
e72053f4f1ab50cf1042ada4fabc7920d7d1aeacbf983aadc6ca1158b295dff8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / rest_client_micro-0.3.22-py3-none-any.whl
| Download URL | rest_client_micro-0.3.22-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
738ea55da925cc538ff5efc30770e7171ba98ee10da9a110d3b8eaef210385c7
|
|
BLAKE2b-256 checksum How to use checksums |
73d097e7f1f52da7aea2f21402b833d44fb76a49adb4a43c335d579432584347
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for rest-client-micro 0.3.22
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.