django-requests-api 0.2.0__tar.gz → 0.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/.bumpversion.cfg +20 -20
  2. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/.pre-commit-config.yaml +48 -48
  3. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/CHANGELOG.rst +1 -1
  4. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/CONTRIBUTING.md +3 -3
  5. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/LICENSE +21 -21
  6. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/MANIFEST.in +14 -14
  7. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/PKG-INFO +95 -96
  8. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/README.md +59 -59
  9. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/mkdocs.yml +70 -74
  10. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/pyproject.toml +54 -54
  11. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/requirements/docs.in +3 -3
  12. django-requests-api-0.3.2/requirements/docs.txt +409 -0
  13. django-requests-api-0.3.2/requirements/py310-django32.txt +216 -0
  14. django-requests-api-0.3.2/requirements/py310-django42.txt +212 -0
  15. django-requests-api-0.3.2/requirements/py311-django32.txt +204 -0
  16. django-requests-api-0.3.2/requirements/py311-django42.txt +200 -0
  17. django-requests-api-0.3.2/requirements/py38-django32.txt +224 -0
  18. django-requests-api-0.3.2/requirements/py38-django42.txt +238 -0
  19. django-requests-api-0.3.2/requirements/py39-django32.txt +224 -0
  20. django-requests-api-0.3.2/requirements/py39-django42.txt +220 -0
  21. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/requirements/requirements.in +6 -6
  22. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/runtests.py +52 -52
  23. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/setup.cfg +85 -86
  24. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/setup.py +6 -6
  25. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/src/django_requests_api.egg-info/PKG-INFO +95 -96
  26. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/src/django_requests_api.egg-info/SOURCES.txt +5 -9
  27. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/src/django_requests_api.egg-info/not-zip-safe +1 -1
  28. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/src/django_requests_api.egg-info/requires.txt +1 -1
  29. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/src/requests_api/__init__.py +22 -22
  30. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/src/requests_api/apps.py +7 -7
  31. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/src/requests_api/requests_api.py +55 -54
  32. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/tests/settings.py +18 -18
  33. django-requests-api-0.3.2/tests/test_requests_api.py +31 -0
  34. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/tests/urls.py +2 -2
  35. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/tests/views.py +1 -1
  36. django-requests-api-0.3.2/tox.ini +34 -0
  37. django-requests-api-0.2.0/requirements/docs.txt +0 -231
  38. django-requests-api-0.2.0/requirements/py310-django32.txt +0 -113
  39. django-requests-api-0.2.0/requirements/py310-django40.txt +0 -109
  40. django-requests-api-0.2.0/requirements/py311-django32.txt +0 -113
  41. django-requests-api-0.2.0/requirements/py311-django40.txt +0 -109
  42. django-requests-api-0.2.0/requirements/py37-django22.txt +0 -124
  43. django-requests-api-0.2.0/requirements/py37-django32.txt +0 -130
  44. django-requests-api-0.2.0/requirements/py38-django22.txt +0 -125
  45. django-requests-api-0.2.0/requirements/py38-django32.txt +0 -129
  46. django-requests-api-0.2.0/requirements/py38-django40.txt +0 -147
  47. django-requests-api-0.2.0/requirements/py39-django22.txt +0 -117
  48. django-requests-api-0.2.0/requirements/py39-django32.txt +0 -121
  49. django-requests-api-0.2.0/requirements/py39-django40.txt +0 -117
  50. django-requests-api-0.2.0/tests/test_iubenda.py +0 -20
  51. django-requests-api-0.2.0/tox.ini +0 -38
  52. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/src/django_requests_api.egg-info/dependency_links.txt +0 -0
  53. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/src/django_requests_api.egg-info/top_level.txt +0 -0
  54. {django-requests-api-0.2.0 → django-requests-api-0.3.2}/tests/__init__.py +0 -0
@@ -1,20 +1,20 @@
1
- [bumpversion]
2
- commit = True
3
- tag = False
4
- current_version = 0.2.0
5
- parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
6
- serialize =
7
- {major}.{minor}.{patch}-{release}
8
- {major}.{minor}.{patch}
9
-
10
- [bumpversion:file:setup.cfg]
11
-
12
- [bumpversion:file:pyproject.toml]
13
-
14
- [bumpversion:file:src/requests_api/__init__.py]
15
-
16
- [bumpversion:part:release]
17
- optional_value = gamma
18
- values =
19
- dev
20
- gamma
1
+ [bumpversion]
2
+ commit = True
3
+ tag = False
4
+ current_version = 0.3.2
5
+ parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
6
+ serialize =
7
+ {major}.{minor}.{patch}-{release}
8
+ {major}.{minor}.{patch}
9
+
10
+ [bumpversion:file:setup.cfg]
11
+
12
+ [bumpversion:file:pyproject.toml]
13
+
14
+ [bumpversion:file:src/requests_api/__init__.py]
15
+
16
+ [bumpversion:part:release]
17
+ optional_value = gamma
18
+ values =
19
+ dev
20
+ gamma
@@ -1,48 +1,48 @@
1
- repos:
2
- - repo: https://github.com/pre-commit/pre-commit-hooks
3
- rev: v4.4.0
4
- hooks:
5
- - id: check-added-large-files
6
- - id: check-case-conflict
7
- - id: check-json
8
- - id: check-merge-conflict
9
- - id: check-symlinks
10
- - id: check-toml
11
- - id: end-of-file-fixer
12
- - id: trailing-whitespace
13
- exclude: .bumpversion.cfg
14
- - repo: https://github.com/asottile/pyupgrade
15
- rev: v3.3.1
16
- hooks:
17
- - id: pyupgrade
18
- args: [--py36-plus]
19
- - repo: https://github.com/psf/black
20
- rev: 22.12.0
21
- hooks:
22
- - id: black
23
- - repo: https://github.com/asottile/blacken-docs
24
- rev: v1.12.1
25
- hooks:
26
- - id: blacken-docs
27
- additional_dependencies:
28
- - black==21.9b0
29
- - repo: https://github.com/pycqa/isort
30
- rev: v5.11.3
31
- hooks:
32
- - id: isort
33
- args: ["--profile", "black"]
34
- - repo: https://github.com/PyCQA/flake8
35
- rev: 6.0.0
36
- hooks:
37
- - id: flake8
38
- additional_dependencies:
39
- - flake8-bugbear
40
- - flake8-comprehensions
41
- - flake8-tidy-imports
42
- - flake8-typing-imports
43
- - repo: https://github.com/mgedmin/check-manifest
44
- rev: "0.49"
45
- hooks:
46
- - id: check-manifest
47
- args: [--no-build-isolation]
48
- additional_dependencies: ["Django>=2.2"]
1
+ repos:
2
+ - repo: https://github.com/pre-commit/pre-commit-hooks
3
+ rev: v4.4.0
4
+ hooks:
5
+ - id: check-added-large-files
6
+ - id: check-case-conflict
7
+ - id: check-json
8
+ - id: check-merge-conflict
9
+ - id: check-symlinks
10
+ - id: check-toml
11
+ - id: end-of-file-fixer
12
+ - id: trailing-whitespace
13
+ exclude: .bumpversion.cfg
14
+ - repo: https://github.com/asottile/pyupgrade
15
+ rev: v3.7.0
16
+ hooks:
17
+ - id: pyupgrade
18
+ args: [--py36-plus]
19
+ - repo: https://github.com/psf/black
20
+ rev: 23.3.0
21
+ hooks:
22
+ - id: black
23
+ - repo: https://github.com/asottile/blacken-docs
24
+ rev: 1.14.0
25
+ hooks:
26
+ - id: blacken-docs
27
+ additional_dependencies:
28
+ - black>=22.12.0
29
+ - repo: https://github.com/pycqa/isort
30
+ rev: 5.12.0
31
+ hooks:
32
+ - id: isort
33
+ args: ["--profile", "black"]
34
+ - repo: https://github.com/PyCQA/flake8
35
+ rev: 6.0.0
36
+ hooks:
37
+ - id: flake8
38
+ additional_dependencies:
39
+ - flake8-bugbear
40
+ - flake8-comprehensions
41
+ - flake8-tidy-imports
42
+ - flake8-typing-imports
43
+ - repo: https://github.com/mgedmin/check-manifest
44
+ rev: "0.49"
45
+ hooks:
46
+ - id: check-manifest
47
+ args: [--no-build-isolation]
48
+ additional_dependencies: ["Django>=2.2"]
@@ -1,4 +1,4 @@
1
- Django_Errors 0.9.4-dev (2021-11-12)
1
+ requests_api 0.2.0-dev (2023-06-23)
2
2
  ====================================
3
3
 
4
4
 
@@ -1,3 +1,3 @@
1
- # Contributing
2
-
3
- See the [Contributing guide in the documentation](https://dlrsp.github.io/django-requests-api/community/contributing/).
1
+ # Contributing
2
+
3
+ See the [Contributing guide in the documentation](https://dlrsp.github.io/django-requests-api/community/contributing/).
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2010-present DLRSP (https://dlrsp.org) and other contributors.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2010-present DLRSP (https://dlrsp.org) and other contributors.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,14 +1,14 @@
1
- include *.py
2
- include *.rst
3
- include *.md
4
- include *.yaml
5
- include *.yml
6
- include *.cfg
7
- include tox.ini
8
- include LICENSE
9
-
10
- recursive-include requirements *.in *.txt
11
- recursive-exclude requirements *.py
12
- recursive-include src *.py *.html *.css *.js *.po *.mo *.gif *.png *.json
13
- recursive-include tests *.py
14
- recursive-exclude docs *
1
+ include *.py
2
+ include *.rst
3
+ include *.md
4
+ include *.yaml
5
+ include *.yml
6
+ include *.cfg
7
+ include tox.ini
8
+ include LICENSE
9
+
10
+ recursive-include requirements *.in *.txt
11
+ recursive-exclude requirements *.py
12
+ recursive-include src *.py *.html *.css *.js *.po *.mo *.gif *.png *.json
13
+ recursive-include tests *.py
14
+ recursive-exclude docs *
@@ -1,96 +1,95 @@
1
- Metadata-Version: 2.1
2
- Name: django-requests-api
3
- Version: 0.2.0
4
- Summary: Django application to provide simple and shared requests client.
5
- Home-page: https://github.com/DLRSP/django-requests-api
6
- Author: DLRSP
7
- Author-email: dlrsp.dev@gmail.com
8
- License: MIT License
9
- Keywords: django,requests,API,privacy,cookie
10
- Classifier: Development Status :: 4 - Beta
11
- Classifier: Environment :: Web Environment
12
- Classifier: Framework :: Django
13
- Classifier: Framework :: Django :: 3.2
14
- Classifier: Framework :: Django :: 4.0
15
- Classifier: Intended Audience :: Developers
16
- Classifier: License :: OSI Approved :: MIT License
17
- Classifier: Operating System :: OS Independent
18
- Classifier: Programming Language :: Python
19
- Classifier: Programming Language :: Python :: 3
20
- Classifier: Programming Language :: Python :: 3 :: Only
21
- Classifier: Programming Language :: Python :: 3.7
22
- Classifier: Programming Language :: Python :: 3.8
23
- Classifier: Programming Language :: Python :: 3.9
24
- Classifier: Programming Language :: Python :: 3.10
25
- Classifier: Programming Language :: Python :: 3.11
26
- Classifier: Operating System :: OS Independent
27
- Classifier: Topic :: Internet :: WWW/HTTP
28
- Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
29
- Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
30
- Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
31
- Classifier: Topic :: Software Development :: Libraries
32
- Requires-Python: >=3.7
33
- Description-Content-Type: text/markdown
34
- Provides-Extra: testing
35
- Provides-Extra: linting
36
- License-File: LICENSE
37
-
38
- # django-requests-api [![PyPi license](https://img.shields.io/pypi/l/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
39
-
40
- [![PyPi status](https://img.shields.io/pypi/status/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
41
- [![PyPi version](https://img.shields.io/pypi/v/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
42
- [![PyPi python version](https://img.shields.io/pypi/pyversions/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
43
- [![PyPi downloads](https://img.shields.io/pypi/dm/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
44
- [![PyPi downloads](https://img.shields.io/pypi/dw/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
45
- [![PyPi downloads](https://img.shields.io/pypi/dd/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
46
-
47
- ## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-requests-api.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-requests-api.svg)
48
-
49
- ## Test [![codecov.io](https://codecov.io/github/DLRSP/django-requests-api/coverage.svg?branch=master)](https://codecov.io/github/DLRSP/django-requests-api?branch=master) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-requests-api/master.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-requests-api/master) [![gitthub.com](https://github.com/DLRSP/django-requests-api/actions/workflows/ci.yml/badge.svg)](https://github.com/DLRSP/django-requests-api/actions/workflows/ci.yml)
50
-
51
- ## Check Demo Project
52
- * Browser the demo app on-line on [Heroku](https://django-requests-api.herokuapp.com/)
53
- * Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-requests-api)
54
-
55
- ## Requirements
56
- - Python 3.7 to 3.10 supported.
57
- - Django 3.2 to 4.2 supported.
58
-
59
- ## Setup
60
- 1. Install from **pip**:
61
- ```shell
62
- pip install django-requests-api
63
- ```
64
-
65
- 2. Modify `settings.py` by adding the app to `INSTALLED_APPS`:
66
- ```python
67
- INSTALLED_APPS = (
68
- # ...
69
- "requests_api",
70
- # ...
71
- )
72
- ```
73
-
74
- ## Usage
75
-
76
- ```shell
77
- from requests_api import RequestsApi
78
-
79
- client = RequestsApi("https://api.publicapis.org")
80
- r = client.get("/entries")
81
- print(r.json())
82
-
83
- github = RequestsApi("https://api.github.com", headers={"Authorization": "token abcdef"})
84
- r = github.get("/user", headers={"Accept": "application/json"})
85
- print(r.text)
86
- ```
87
-
88
- ## Run Example Project
89
-
90
- ```shell
91
- git clone --depth=50 --branch=django-requests-api https://github.com/DLRSP/example.git DLRSP/example
92
- cd DLRSP/example
93
- python manage.py runserver
94
- ```
95
-
96
- Now browser the app @ http://127.0.0.1:8000
1
+ Metadata-Version: 2.1
2
+ Name: django-requests-api
3
+ Version: 0.3.2
4
+ Summary: Django application to provide simple and shared requests client.
5
+ Home-page: https://github.com/DLRSP/django-requests-api
6
+ Author: DLRSP
7
+ Author-email: dlrsp.dev@gmail.com
8
+ License: MIT License
9
+ Keywords: django,requests,API,privacy,cookie
10
+ Classifier: Development Status :: 4 - Beta
11
+ Classifier: Environment :: Web Environment
12
+ Classifier: Framework :: Django
13
+ Classifier: Framework :: Django :: 3.2
14
+ Classifier: Framework :: Django :: 4.2
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: MIT License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3 :: Only
21
+ Classifier: Programming Language :: Python :: 3.8
22
+ Classifier: Programming Language :: Python :: 3.9
23
+ Classifier: Programming Language :: Python :: 3.10
24
+ Classifier: Programming Language :: Python :: 3.11
25
+ Classifier: Operating System :: OS Independent
26
+ Classifier: Topic :: Internet :: WWW/HTTP
27
+ Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
28
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Application
29
+ Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
30
+ Classifier: Topic :: Software Development :: Libraries
31
+ Requires-Python: >=3.8
32
+ Description-Content-Type: text/markdown
33
+ Provides-Extra: testing
34
+ Provides-Extra: linting
35
+ License-File: LICENSE
36
+
37
+ # django-requests-api [![PyPi license](https://img.shields.io/pypi/l/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
38
+
39
+ [![PyPi status](https://img.shields.io/pypi/status/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
40
+ [![PyPi version](https://img.shields.io/pypi/v/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
41
+ [![PyPi python version](https://img.shields.io/pypi/pyversions/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
42
+ [![PyPi downloads](https://img.shields.io/pypi/dm/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
43
+ [![PyPi downloads](https://img.shields.io/pypi/dw/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
44
+ [![PyPi downloads](https://img.shields.io/pypi/dd/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
45
+
46
+ ## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-requests-api.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-requests-api.svg)
47
+
48
+ ## Test [![codecov.io](https://codecov.io/github/DLRSP/django-requests-api/coverage.svg?branch=master)](https://codecov.io/github/DLRSP/django-requests-api?branch=master) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-requests-api/master.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-requests-api/master) [![gitthub.com](https://github.com/DLRSP/django-requests-api/actions/workflows/ci.yml/badge.svg)](https://github.com/DLRSP/django-requests-api/actions/workflows/ci.yml)
49
+
50
+ ## Check Demo Project
51
+ * Browser the demo app on-line on [Heroku](https://django-requests-api.herokuapp.com/)
52
+ * Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-requests-api)
53
+
54
+ ## Requirements
55
+ - Python 3.8+ supported.
56
+ - Django 3.2+ supported.
57
+
58
+ ## Setup
59
+ 1. Install from **pip**:
60
+ ```shell
61
+ pip install django-requests-api
62
+ ```
63
+
64
+ 2. Modify `settings.py` by adding the app to `INSTALLED_APPS`:
65
+ ```python
66
+ INSTALLED_APPS = (
67
+ # ...
68
+ "requests_api",
69
+ # ...
70
+ )
71
+ ```
72
+
73
+ ## Usage
74
+
75
+ ```shell
76
+ from requests_api import RequestsApi
77
+
78
+ client = RequestsApi("https://api.publicapis.org")
79
+ r = client.get("/entries")
80
+ print(r.json())
81
+
82
+ github = RequestsApi("https://api.github.com", headers={"Authorization": "token abcdef"})
83
+ r = github.get("/user", headers={"Accept": "application/json"})
84
+ print(r.text)
85
+ ```
86
+
87
+ ## Run Example Project
88
+
89
+ ```shell
90
+ git clone --depth=50 --branch=django-requests-api https://github.com/DLRSP/example.git DLRSP/example
91
+ cd DLRSP/example
92
+ python manage.py runserver
93
+ ```
94
+
95
+ Now browser the app @ http://127.0.0.1:8000
@@ -1,59 +1,59 @@
1
- # django-requests-api [![PyPi license](https://img.shields.io/pypi/l/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
2
-
3
- [![PyPi status](https://img.shields.io/pypi/status/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
4
- [![PyPi version](https://img.shields.io/pypi/v/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
5
- [![PyPi python version](https://img.shields.io/pypi/pyversions/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
6
- [![PyPi downloads](https://img.shields.io/pypi/dm/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
7
- [![PyPi downloads](https://img.shields.io/pypi/dw/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
8
- [![PyPi downloads](https://img.shields.io/pypi/dd/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
9
-
10
- ## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-requests-api.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-requests-api.svg)
11
-
12
- ## Test [![codecov.io](https://codecov.io/github/DLRSP/django-requests-api/coverage.svg?branch=master)](https://codecov.io/github/DLRSP/django-requests-api?branch=master) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-requests-api/master.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-requests-api/master) [![gitthub.com](https://github.com/DLRSP/django-requests-api/actions/workflows/ci.yml/badge.svg)](https://github.com/DLRSP/django-requests-api/actions/workflows/ci.yml)
13
-
14
- ## Check Demo Project
15
- * Browser the demo app on-line on [Heroku](https://django-requests-api.herokuapp.com/)
16
- * Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-requests-api)
17
-
18
- ## Requirements
19
- - Python 3.7 to 3.10 supported.
20
- - Django 3.2 to 4.2 supported.
21
-
22
- ## Setup
23
- 1. Install from **pip**:
24
- ```shell
25
- pip install django-requests-api
26
- ```
27
-
28
- 2. Modify `settings.py` by adding the app to `INSTALLED_APPS`:
29
- ```python
30
- INSTALLED_APPS = (
31
- # ...
32
- "requests_api",
33
- # ...
34
- )
35
- ```
36
-
37
- ## Usage
38
-
39
- ```shell
40
- from requests_api import RequestsApi
41
-
42
- client = RequestsApi("https://api.publicapis.org")
43
- r = client.get("/entries")
44
- print(r.json())
45
-
46
- github = RequestsApi("https://api.github.com", headers={"Authorization": "token abcdef"})
47
- r = github.get("/user", headers={"Accept": "application/json"})
48
- print(r.text)
49
- ```
50
-
51
- ## Run Example Project
52
-
53
- ```shell
54
- git clone --depth=50 --branch=django-requests-api https://github.com/DLRSP/example.git DLRSP/example
55
- cd DLRSP/example
56
- python manage.py runserver
57
- ```
58
-
59
- Now browser the app @ http://127.0.0.1:8000
1
+ # django-requests-api [![PyPi license](https://img.shields.io/pypi/l/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
2
+
3
+ [![PyPi status](https://img.shields.io/pypi/status/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
4
+ [![PyPi version](https://img.shields.io/pypi/v/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
5
+ [![PyPi python version](https://img.shields.io/pypi/pyversions/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
6
+ [![PyPi downloads](https://img.shields.io/pypi/dm/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
7
+ [![PyPi downloads](https://img.shields.io/pypi/dw/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
8
+ [![PyPi downloads](https://img.shields.io/pypi/dd/django-requests-api.svg)](https://pypi.python.org/pypi/django-requests-api)
9
+
10
+ ## GitHub ![GitHub release](https://img.shields.io/github/tag/DLRSP/django-requests-api.svg) ![GitHub release](https://img.shields.io/github/release/DLRSP/django-requests-api.svg)
11
+
12
+ ## Test [![codecov.io](https://codecov.io/github/DLRSP/django-requests-api/coverage.svg?branch=master)](https://codecov.io/github/DLRSP/django-requests-api?branch=master) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/DLRSP/django-requests-api/master.svg)](https://results.pre-commit.ci/latest/github/DLRSP/django-requests-api/master) [![gitthub.com](https://github.com/DLRSP/django-requests-api/actions/workflows/ci.yml/badge.svg)](https://github.com/DLRSP/django-requests-api/actions/workflows/ci.yml)
13
+
14
+ ## Check Demo Project
15
+ * Browser the demo app on-line on [Heroku](https://django-requests-api.herokuapp.com/)
16
+ * Check the demo repo on [GitHub](https://github.com/DLRSP/example/tree/django-requests-api)
17
+
18
+ ## Requirements
19
+ - Python 3.8+ supported.
20
+ - Django 3.2+ supported.
21
+
22
+ ## Setup
23
+ 1. Install from **pip**:
24
+ ```shell
25
+ pip install django-requests-api
26
+ ```
27
+
28
+ 2. Modify `settings.py` by adding the app to `INSTALLED_APPS`:
29
+ ```python
30
+ INSTALLED_APPS = (
31
+ # ...
32
+ "requests_api",
33
+ # ...
34
+ )
35
+ ```
36
+
37
+ ## Usage
38
+
39
+ ```shell
40
+ from requests_api import RequestsApi
41
+
42
+ client = RequestsApi("https://api.publicapis.org")
43
+ r = client.get("/entries")
44
+ print(r.json())
45
+
46
+ github = RequestsApi("https://api.github.com", headers={"Authorization": "token abcdef"})
47
+ r = github.get("/user", headers={"Accept": "application/json"})
48
+ print(r.text)
49
+ ```
50
+
51
+ ## Run Example Project
52
+
53
+ ```shell
54
+ git clone --depth=50 --branch=django-requests-api https://github.com/DLRSP/example.git DLRSP/example
55
+ cd DLRSP/example
56
+ python manage.py runserver
57
+ ```
58
+
59
+ Now browser the app @ http://127.0.0.1:8000