Skip to content

Commit 347ee05

Browse files
committed
[update] change name
1 parent c27663b commit 347ee05

File tree

16 files changed

+71
-32
lines changed

16 files changed

+71
-32
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
# Django Proxy API
1+
# Django Simple API Proxy
22

3-
This is a tool for proxying any APIs on Django server.
3+
This is a simple tool for proxying any APIs easily on your Django server.
44

55
You can use it as middleware to make a layer for user authorization or something.
66

77
## Installation
88

99
```bash
10-
pip install djangoapiproxy
10+
pip install django-simple-api-proxy
1111
```
1212

1313
## Quick Start
1414

15-
1. Add `django_api_proxy` to your `INSTALLED_APPS` in `settings.py` like this:
15+
1. Add `django_simple_api_proxy` to your `INSTALLED_APPS` in `settings.py` like this:
1616

1717
```py
1818
INSTALLED_APPS = [
1919
...
20-
'django_api_proxy',
20+
'django_simple_api_proxy',
2121
]
2222
```
2323

@@ -29,13 +29,13 @@ PROXY_ROUTE_PATH = 'my_test_route'
2929
PROXY_TARGET_PATH = ''
3030
```
3131

32-
3. Include the `django_api_proxy` URL settings in your project `urls.py` like this:
32+
3. Include the `django_simple_api_proxy` URL settings in your project `urls.py` like this:
3333

3434
```py
3535
from django.conf import settings
3636
from django.urls import include
3737
urlpatterns += [
38-
path(settings.PROXY_ROUTE_PATH, include('django_api_proxy.urls'))
38+
path(settings.PROXY_ROUTE_PATH, include('django_simple_api_proxy.urls'))
3939
]
4040
```
4141

@@ -54,9 +54,9 @@ And the result will be as below.
5454

5555
```log
5656
[06/Sep/2022 01:26:04] "GET /my_test_route/ HTTP/1.1" 200 314
57-
2022-09-06 01:26:06.338 | DEBUG | django_api_proxy.views:get:73 - ----- Proxy GET
58-
2022-09-06 01:26:06.339 | DEBUG | django_api_proxy.views:get_proxy_path:37 - URL: /get
59-
2022-09-06 01:26:06.340 | DEBUG | django_api_proxy.views:update_payload:49 - Username: #anonymous
57+
2022-09-06 01:26:06.338 | DEBUG | django_simple_api_proxy.views:get:73 - ----- Proxy GET
58+
2022-09-06 01:26:06.339 | DEBUG | django_simple_api_proxy.views:get_proxy_path:37 - URL: /get
59+
2022-09-06 01:26:06.340 | DEBUG | django_simple_api_proxy.views:update_payload:49 - Username: #anonymous
6060
```
6161

6262
```json
@@ -100,7 +100,7 @@ from rest_framework.authentication import SessionAuthentication
100100
from rest_framework_simplejwt.authentication import JWTAuthentication
101101
from rest_framework.permissions import IsAuthenticated
102102

103-
from django_api_proxy.views import APIProxy
103+
from django_simple_api_proxy.views import APIProxy
104104

105105
class MyAPIProxy(APIProxy):
106106
# give custom authentication

example/api_proxy_example/api_proxy_example/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
'django.contrib.sessions',
3838
'django.contrib.messages',
3939
'django.contrib.staticfiles',
40-
'django_api_proxy' # add here
40+
'django_simple_api_proxy' # add here
4141
]
4242

4343

example/api_proxy_example/api_proxy_example/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@
2626
from django.urls import include
2727

2828
urlpatterns += [
29-
path(settings.PROXY_ROUTE_PATH, include('django_api_proxy.urls'))
29+
path(settings.PROXY_ROUTE_PATH, include('django_simple_api_proxy.urls'))
3030
]

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[metadata]
2-
version = attr: django_api_proxy.__version__
2+
version = attr: django_simple_api_proxy.__version__
33
license_files = LICENSE

setup.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
long_description = fh.read()
55

66
setuptools.setup(
7-
name='django-api-proxy',
8-
fullname='django-api-proxy',
7+
name='django-simple-api-proxy',
8+
fullname='django-simple-api-proxy',
99
author='Nat Lee',
1010
author_email='[email protected]',
11-
description='Proxy any APIs you want.',
11+
description='Easy to proxy any APIs you want.',
1212
keywords='django, api, proxy, proxy pass',
1313
long_description=long_description,
1414
long_description_content_type='text/markdown',
@@ -36,15 +36,10 @@
3636
'License :: OSI Approved :: MIT License',
3737
'Operating System :: OS Independent',
3838
],
39-
python_requires='>=3.7',
39+
python_requires='>=3.8',
4040
install_requires=['django>=4.0.0', 'requests', 'loguru', 'djangorestframework'],
4141
extras_require={
4242
'dev': ['check-manifest'],
4343
# 'test': ['coverage'],
4444
},
45-
#entry_points={
46-
# 'console_scripts': [
47-
# 'django_api_proxy=django_api_proxy.cli:main'
48-
# ]
49-
#}
5045
)
File renamed without changes.
File renamed without changes.

src/django_api_proxy/apps.py renamed to src/django_simple_api_proxy/apps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
class ApiProxyConfig(AppConfig):
55
default_auto_field = 'django.db.models.BigAutoField'
6-
name = 'django_api_proxy'
6+
name = 'django_simple_api_proxy'
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)