Skip to main content

Django''s application to provide simple and shared requests client.

Project description

django-requests-api PyPi license

PyPi status PyPi version PyPi python version PyPi downloads PyPi downloads PyPi downloads

GitHub GitHub release GitHub release

Test codecov.io pre-commit.ci status gitthub.com

Check Demo Project

  • Browser the demo app on-line on Heroku
  • Check the demo repo on GitHub

Requirements

  • Python 3.8+ supported.
  • Django 3.2+ supported.

Setup

  1. Install from pip:
pip install django-requests-api
  1. Modify settings.py by adding the app to INSTALLED_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


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)

Uploaded Source

Built Distribution

django_requests_api-0.6.0-py2.py3-none-any.whl (5.0 kB view details)

Uploaded Python 2Python 3

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

Hashes for django_requests_api-0.6.0.tar.gz
Algorithm Hash digest
SHA256 55bbf6d771a18b9965233db2a76d63159210de2e9b0079a83c994c95d04994f9
MD5 29d0bf21c9e5dc7b4f8c2554a8f1b9b6
BLAKE2b-256 fd84243f5921c3349eb14b7a760314af3d47f555f57213fc359fc4cbeffd2bac

See more details on using hashes here.

File details

Details for the file django_requests_api-0.6.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for django_requests_api-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 975e690965ed498725c7fa6cb82353dcf11f9ef4212208aaea550be72dfd3ca2
MD5 06c9e1c4431de8a7c67f2d054076fda5
BLAKE2b-256 40cf133c9990bbe478e9bb473cf19fe3553adc76fc8a7dedaba0763ce7fbfb75

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page