nya-proxy 0.2.0__tar.gz → 0.2.1__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 (52) hide show
  1. {nya_proxy-0.2.0/nya_proxy.egg-info → nya_proxy-0.2.1}/PKG-INFO +8 -8
  2. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/README.md +6 -6
  3. nya_proxy-0.2.1/nya/_version.py +1 -0
  4. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/html/index.html +6 -10
  5. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/html/login.html +7 -13
  6. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/server/auth.py +9 -1
  7. {nya_proxy-0.2.0 → nya_proxy-0.2.1/nya_proxy.egg-info}/PKG-INFO +8 -8
  8. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya_proxy.egg-info/requires.txt +1 -1
  9. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/pyproject.toml +2 -2
  10. nya_proxy-0.2.0/nya/_version.py +0 -1
  11. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/LICENSE +0 -0
  12. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/__init__.py +0 -0
  13. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/common/__init__.py +0 -0
  14. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/common/constants.py +0 -0
  15. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/common/exceptions.py +0 -0
  16. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/common/logger.py +0 -0
  17. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/common/models.py +0 -0
  18. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/config/__init__.py +0 -0
  19. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/config/manager.py +0 -0
  20. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/config.yaml +0 -0
  21. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/core/__init__.py +0 -0
  22. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/core/factory.py +0 -0
  23. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/core/handler.py +0 -0
  24. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/core/proxy.py +0 -0
  25. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/core/request.py +0 -0
  26. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/core/response.py +0 -0
  27. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/core/streaming.py +0 -0
  28. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/dashboard/__init__.py +0 -0
  29. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/dashboard/api.py +0 -0
  30. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/html/favicon.ico +0 -0
  31. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/html/static/css/styles.css +0 -0
  32. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/html/static/js/dashboard.js +0 -0
  33. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/html/static/logo.svg +0 -0
  34. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/integrations/__init__.py +0 -0
  35. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/integrations/openai.py +0 -0
  36. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/schema.json +0 -0
  37. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/server/__init__.py +0 -0
  38. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/server/app.py +0 -0
  39. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/services/__init__.py +0 -0
  40. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/services/key.py +0 -0
  41. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/services/lb.py +0 -0
  42. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/services/limit.py +0 -0
  43. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/services/metrics.py +0 -0
  44. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/services/queue.py +0 -0
  45. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/utils/__init__.py +0 -0
  46. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/utils/header.py +0 -0
  47. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya/utils/helper.py +0 -0
  48. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya_proxy.egg-info/SOURCES.txt +0 -0
  49. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya_proxy.egg-info/dependency_links.txt +0 -0
  50. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya_proxy.egg-info/entry_points.txt +0 -0
  51. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/nya_proxy.egg-info/top_level.txt +0 -0
  52. {nya_proxy-0.2.0 → nya_proxy-0.2.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nya-proxy
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: A lightweight, flexible API proxy with dynamic token rotation, load balancing, and rate limiting capabilities.
5
5
  Author-email: "Nya Foundation Team (k3scat)" <k3scat@gmail.com>
6
6
  License-Expression: MIT
@@ -26,7 +26,7 @@ Requires-Dist: brotli>=1.0.9
26
26
  Requires-Dist: jmespath>=1.0.1
27
27
  Requires-Dist: colorlog>=6.9.0
28
28
  Requires-Dist: orjson<4,>=3.10
29
- Requires-Dist: nekoconf[remote,schema,server]==1.0.2
29
+ Requires-Dist: nekoconf[remote,schema,server]==1.0.3
30
30
  Provides-Extra: dev
31
31
  Requires-Dist: pytest>=7.0.0; extra == "dev"
32
32
  Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
@@ -44,26 +44,26 @@ Dynamic: license-file
44
44
  <div align="center">
45
45
  <img src="https://raw.githubusercontent.com/Nya-Foundation/NyaProxy/main/assets/banner.png" alt="NyaProxy Banner" width="800" />
46
46
 
47
- <h3>Your purr-fect Swiss Army Knife for API Proxy Management~</h3>
47
+ <h3>The smart way to balance, secure, and monitor all your API interactions</h3>
48
48
 
49
49
  <div>
50
+ <a href="https://github.com/Nya-Foundation/nyaproxy/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Nya-Foundation/nyaproxy.svg" alt="License"/></a>
50
51
  <a href="https://pypi.org/project/nya-proxy/"><img src="https://img.shields.io/pypi/v/nya-proxy.svg" alt="PyPI version"/></a>
51
52
  <a href="https://pypi.org/project/nya-proxy/"><img src="https://img.shields.io/pypi/pyversions/nya-proxy.svg" alt="Python versions"/></a>
52
- <a href="https://github.com/Nya-Foundation/nyaproxy/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Nya-Foundation/nyaproxy.svg" alt="License"/></a>
53
+ <a href="https://pepy.tech/projects/nya-proxy"><img src="https://static.pepy.tech/badge/nya-proxy" alt="PyPI Downloads"/></a>
54
+ <a href="https://hub.docker.com/r/k3scat/nya-proxy"><img src="https://img.shields.io/docker/pulls/k3scat/nya-proxy" alt="Docker Pulls"/></a>
55
+ <a href="https://deepwiki.com/Nya-Foundation/NyaProxy"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"/></a>
53
56
  </div>
54
57
 
55
58
  <div>
56
59
  <a href="https://codecov.io/gh/Nya-Foundation/nyaproxy"><img src="https://codecov.io/gh/Nya-Foundation/nyaproxy/branch/main/graph/badge.svg" alt="Code Coverage"/></a>
57
60
  <a href="https://github.com/nya-foundation/nyaproxy/actions/workflows/scan.yml"><img src="https://github.com/nya-foundation/nyaproxy/actions/workflows/scan.yml/badge.svg" alt="CodeQL & Dependencies Scan"/></a>
58
61
  <a href="https://github.com/Nya-Foundation/nyaproxy/actions/workflows/publish.yml"><img src="https://github.com/Nya-Foundation/nyaproxy/actions/workflows/publish.yml/badge.svg" alt="CI/CD Builds"/></a>
59
- <a href="https://hub.docker.com/r/k3scat/nya-proxy"><img src="https://img.shields.io/docker/pulls/k3scat/nya-proxy" alt="Docker"/></a>
60
62
  </div>
61
63
  </div>
62
64
 
63
65
  ## 🌈 Introduction
64
66
 
65
- *Your purr-fect Swiss Army Knife for API Proxy Management~*
66
-
67
67
  NyaProxy acts like a smart, central manager for accessing various online services (APIs) – think AI tools (like OpenAI, Gemini, Anthropic), image generators, or almost any web service that uses access keys. It helps you use these services more reliably, efficiently, and securely.
68
68
 
69
69
  Here's how NyaProxy can help:
@@ -118,7 +118,7 @@ Pick your favorite platform and let's go!
118
118
  ### Local Deployment (For the DIY Enthusiasts!)
119
119
 
120
120
  #### Prerequisites
121
- - Python 3.8 or higher
121
+ - Python 3.11 or higher
122
122
  - Docker (optional, for containerized deployment)
123
123
 
124
124
  #### Installation
@@ -3,26 +3,26 @@
3
3
  <div align="center">
4
4
  <img src="https://raw.githubusercontent.com/Nya-Foundation/NyaProxy/main/assets/banner.png" alt="NyaProxy Banner" width="800" />
5
5
 
6
- <h3>Your purr-fect Swiss Army Knife for API Proxy Management~</h3>
6
+ <h3>The smart way to balance, secure, and monitor all your API interactions</h3>
7
7
 
8
8
  <div>
9
+ <a href="https://github.com/Nya-Foundation/nyaproxy/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Nya-Foundation/nyaproxy.svg" alt="License"/></a>
9
10
  <a href="https://pypi.org/project/nya-proxy/"><img src="https://img.shields.io/pypi/v/nya-proxy.svg" alt="PyPI version"/></a>
10
11
  <a href="https://pypi.org/project/nya-proxy/"><img src="https://img.shields.io/pypi/pyversions/nya-proxy.svg" alt="Python versions"/></a>
11
- <a href="https://github.com/Nya-Foundation/nyaproxy/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Nya-Foundation/nyaproxy.svg" alt="License"/></a>
12
+ <a href="https://pepy.tech/projects/nya-proxy"><img src="https://static.pepy.tech/badge/nya-proxy" alt="PyPI Downloads"/></a>
13
+ <a href="https://hub.docker.com/r/k3scat/nya-proxy"><img src="https://img.shields.io/docker/pulls/k3scat/nya-proxy" alt="Docker Pulls"/></a>
14
+ <a href="https://deepwiki.com/Nya-Foundation/NyaProxy"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"/></a>
12
15
  </div>
13
16
 
14
17
  <div>
15
18
  <a href="https://codecov.io/gh/Nya-Foundation/nyaproxy"><img src="https://codecov.io/gh/Nya-Foundation/nyaproxy/branch/main/graph/badge.svg" alt="Code Coverage"/></a>
16
19
  <a href="https://github.com/nya-foundation/nyaproxy/actions/workflows/scan.yml"><img src="https://github.com/nya-foundation/nyaproxy/actions/workflows/scan.yml/badge.svg" alt="CodeQL & Dependencies Scan"/></a>
17
20
  <a href="https://github.com/Nya-Foundation/nyaproxy/actions/workflows/publish.yml"><img src="https://github.com/Nya-Foundation/nyaproxy/actions/workflows/publish.yml/badge.svg" alt="CI/CD Builds"/></a>
18
- <a href="https://hub.docker.com/r/k3scat/nya-proxy"><img src="https://img.shields.io/docker/pulls/k3scat/nya-proxy" alt="Docker"/></a>
19
21
  </div>
20
22
  </div>
21
23
 
22
24
  ## 🌈 Introduction
23
25
 
24
- *Your purr-fect Swiss Army Knife for API Proxy Management~*
25
-
26
26
  NyaProxy acts like a smart, central manager for accessing various online services (APIs) – think AI tools (like OpenAI, Gemini, Anthropic), image generators, or almost any web service that uses access keys. It helps you use these services more reliably, efficiently, and securely.
27
27
 
28
28
  Here's how NyaProxy can help:
@@ -77,7 +77,7 @@ Pick your favorite platform and let's go!
77
77
  ### Local Deployment (For the DIY Enthusiasts!)
78
78
 
79
79
  #### Prerequisites
80
- - Python 3.8 or higher
80
+ - Python 3.11 or higher
81
81
  - Docker (optional, for containerized deployment)
82
82
 
83
83
  #### Installation
@@ -0,0 +1 @@
1
+ __version__ = "0.2.1"
@@ -30,16 +30,12 @@
30
30
  class="container mx-auto px-4 py-3.5 flex justify-between items-center"
31
31
  >
32
32
  <div class="flex items-center space-x-3">
33
- <div
34
- class="w-8 h-8 bg-gradient-to-br from-pink-400 to-purple-250 rounded-lg flex items-center justify-center shadow-lg shadow-pink-500/20"
35
- >
36
- <img
37
- class="app-logo"
38
- src="{{ request.scope.root_path }}/static/logo.svg"
39
- width="40"
40
- height="40"
41
- />
42
- </div>
33
+ <img
34
+ class="app-logo"
35
+ src="{{ request.scope.root_path }}/static/logo.svg"
36
+ width="40"
37
+ height="40"
38
+ />
43
39
  <h1 class="text-xl font-bold">
44
40
  NyaProxy
45
41
  <span
@@ -303,19 +303,13 @@
303
303
 
304
304
  <div class="login-card">
305
305
  <div class="header">
306
- <div class="logo">
307
- <svg
308
- xmlns="http://www.w3.org/2000/svg"
309
- viewBox="0 0 24 24"
310
- fill="none"
311
- stroke="currentColor"
312
- stroke-width="2"
313
- stroke-linecap="round"
314
- stroke-linejoin="round"
315
- >
316
- <path d="M5 12h14"></path>
317
- <path d="M12 5l7 7-7 7"></path>
318
- </svg>
306
+ <div>
307
+ <img
308
+ class="app-logo"
309
+ src="/dashboard/static/logo.svg"
310
+ width="70"
311
+ height="70"
312
+ />
319
313
  </div>
320
314
  <h1>NyaProxy</h1>
321
315
  <p class="subtitle">Enter your API key to access the service</p>
@@ -177,7 +177,15 @@ class AuthMiddleware(BaseHTTPMiddleware):
177
177
 
178
178
  async def dispatch(self, request: Request, call_next):
179
179
  # Skip auth for specific paths if needed
180
- excluded_paths = ["/", "/info", "/docs", "/redoc", "/openapi.json"]
180
+ excluded_paths = [
181
+ "/",
182
+ "/info",
183
+ "/docs",
184
+ "/redoc",
185
+ "/openapi.json",
186
+ "/dashboard/static/logo.svg",
187
+ "/dashboard/favicon.ico",
188
+ ]
181
189
  if any(request.url.path == path for path in excluded_paths):
182
190
  return await call_next(request)
183
191
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nya-proxy
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: A lightweight, flexible API proxy with dynamic token rotation, load balancing, and rate limiting capabilities.
5
5
  Author-email: "Nya Foundation Team (k3scat)" <k3scat@gmail.com>
6
6
  License-Expression: MIT
@@ -26,7 +26,7 @@ Requires-Dist: brotli>=1.0.9
26
26
  Requires-Dist: jmespath>=1.0.1
27
27
  Requires-Dist: colorlog>=6.9.0
28
28
  Requires-Dist: orjson<4,>=3.10
29
- Requires-Dist: nekoconf[remote,schema,server]==1.0.2
29
+ Requires-Dist: nekoconf[remote,schema,server]==1.0.3
30
30
  Provides-Extra: dev
31
31
  Requires-Dist: pytest>=7.0.0; extra == "dev"
32
32
  Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
@@ -44,26 +44,26 @@ Dynamic: license-file
44
44
  <div align="center">
45
45
  <img src="https://raw.githubusercontent.com/Nya-Foundation/NyaProxy/main/assets/banner.png" alt="NyaProxy Banner" width="800" />
46
46
 
47
- <h3>Your purr-fect Swiss Army Knife for API Proxy Management~</h3>
47
+ <h3>The smart way to balance, secure, and monitor all your API interactions</h3>
48
48
 
49
49
  <div>
50
+ <a href="https://github.com/Nya-Foundation/nyaproxy/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Nya-Foundation/nyaproxy.svg" alt="License"/></a>
50
51
  <a href="https://pypi.org/project/nya-proxy/"><img src="https://img.shields.io/pypi/v/nya-proxy.svg" alt="PyPI version"/></a>
51
52
  <a href="https://pypi.org/project/nya-proxy/"><img src="https://img.shields.io/pypi/pyversions/nya-proxy.svg" alt="Python versions"/></a>
52
- <a href="https://github.com/Nya-Foundation/nyaproxy/blob/main/LICENSE"><img src="https://img.shields.io/github/license/Nya-Foundation/nyaproxy.svg" alt="License"/></a>
53
+ <a href="https://pepy.tech/projects/nya-proxy"><img src="https://static.pepy.tech/badge/nya-proxy" alt="PyPI Downloads"/></a>
54
+ <a href="https://hub.docker.com/r/k3scat/nya-proxy"><img src="https://img.shields.io/docker/pulls/k3scat/nya-proxy" alt="Docker Pulls"/></a>
55
+ <a href="https://deepwiki.com/Nya-Foundation/NyaProxy"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"/></a>
53
56
  </div>
54
57
 
55
58
  <div>
56
59
  <a href="https://codecov.io/gh/Nya-Foundation/nyaproxy"><img src="https://codecov.io/gh/Nya-Foundation/nyaproxy/branch/main/graph/badge.svg" alt="Code Coverage"/></a>
57
60
  <a href="https://github.com/nya-foundation/nyaproxy/actions/workflows/scan.yml"><img src="https://github.com/nya-foundation/nyaproxy/actions/workflows/scan.yml/badge.svg" alt="CodeQL & Dependencies Scan"/></a>
58
61
  <a href="https://github.com/Nya-Foundation/nyaproxy/actions/workflows/publish.yml"><img src="https://github.com/Nya-Foundation/nyaproxy/actions/workflows/publish.yml/badge.svg" alt="CI/CD Builds"/></a>
59
- <a href="https://hub.docker.com/r/k3scat/nya-proxy"><img src="https://img.shields.io/docker/pulls/k3scat/nya-proxy" alt="Docker"/></a>
60
62
  </div>
61
63
  </div>
62
64
 
63
65
  ## 🌈 Introduction
64
66
 
65
- *Your purr-fect Swiss Army Knife for API Proxy Management~*
66
-
67
67
  NyaProxy acts like a smart, central manager for accessing various online services (APIs) – think AI tools (like OpenAI, Gemini, Anthropic), image generators, or almost any web service that uses access keys. It helps you use these services more reliably, efficiently, and securely.
68
68
 
69
69
  Here's how NyaProxy can help:
@@ -118,7 +118,7 @@ Pick your favorite platform and let's go!
118
118
  ### Local Deployment (For the DIY Enthusiasts!)
119
119
 
120
120
  #### Prerequisites
121
- - Python 3.8 or higher
121
+ - Python 3.11 or higher
122
122
  - Docker (optional, for containerized deployment)
123
123
 
124
124
  #### Installation
@@ -9,7 +9,7 @@ brotli>=1.0.9
9
9
  jmespath>=1.0.1
10
10
  colorlog>=6.9.0
11
11
  orjson<4,>=3.10
12
- nekoconf[remote,schema,server]==1.0.2
12
+ nekoconf[remote,schema,server]==1.0.3
13
13
 
14
14
  [dev]
15
15
  pytest>=7.0.0
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "nya-proxy"
7
- version = "0.2.0"
7
+ version = "0.2.1"
8
8
  description = "A lightweight, flexible API proxy with dynamic token rotation, load balancing, and rate limiting capabilities."
9
9
  readme = "README.md"
10
10
  authors = [
@@ -34,7 +34,7 @@ dependencies = [
34
34
  "jmespath>=1.0.1",
35
35
  "colorlog>=6.9.0",
36
36
  "orjson>=3.10,<4",
37
- "nekoconf[remote,schema,server]==1.0.2",
37
+ "nekoconf[remote,schema,server]==1.0.3",
38
38
  ]
39
39
 
40
40
  [project.optional-dependencies]
@@ -1 +0,0 @@
1
- __version__ = "0.2.0"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes