Django''s application to provide simple and shared requests client.
Project description
django-requests-api 
GitHub

Test

Check Demo Project
Requirements
- Python 3.8+ supported.
- Django 3.2+ supported.
Setup
- Install from pip:
pip install django-requests-api
- Modify
settings.py
by adding the app toINSTALLED_APPS
:
INSTALLED_APPS = (
# ...
"requests_api",
# ...
)
Usage
from requests_api import RequestsApi
client = RequestsApi("https://api.publicapis.org")
r = client.get("/entries")
print(r.json())
github = RequestsApi("https://api.github.com", headers={"Authorization": "token abcdef"})
r = github.get("/user", headers={"Accept": "application/json"})
print(r.text)
Run Example Project
git clone --depth=50 --branch=django-requests-api https://github.com/DLRSP/example.git DLRSP/example
cd DLRSP/example
python manage.py runserver
Now browser the app @ http://127.0.0.1:8000
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
django_requests_api-0.6.0.tar.gz
(17.4 kB
view details)
Built Distribution
File details
Details for the file django_requests_api-0.6.0.tar.gz
.
File metadata
- Download URL: django_requests_api-0.6.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
55bbf6d771a18b9965233db2a76d63159210de2e9b0079a83c994c95d04994f9
|
|
MD5 |
29d0bf21c9e5dc7b4f8c2554a8f1b9b6
|
|
BLAKE2b-256 |
fd84243f5921c3349eb14b7a760314af3d47f555f57213fc359fc4cbeffd2bac
|
File details
Details for the file django_requests_api-0.6.0-py2.py3-none-any.whl
.
File metadata
- Download URL: django_requests_api-0.6.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
975e690965ed498725c7fa6cb82353dcf11f9ef4212208aaea550be72dfd3ca2
|
|
MD5 |
06c9e1c4431de8a7c67f2d054076fda5
|
|
BLAKE2b-256 |
40cf133c9990bbe478e9bb473cf19fe3553adc76fc8a7dedaba0763ce7fbfb75
|