Add transparent PyPI proxy and improve upstream sources UI
- Implement PEP 503 Simple API endpoints for pip compatibility:
- GET /pypi/simple/ - package index
- GET /pypi/simple/{package}/ - version list with rewritten links
- GET /pypi/simple/{package}/{filename} - download with auto-caching
- Improve upstream sources table UI:
- Center text under column headers
- Remove separate Source column, show ENV badge inline with name
- Make Test/Edit buttons more prominent with secondary button style
This commit is contained in:
@@ -11,6 +11,7 @@ from slowapi.errors import RateLimitExceeded
|
||||
from .config import get_settings
|
||||
from .database import init_db, SessionLocal
|
||||
from .routes import router
|
||||
from .pypi_proxy import router as pypi_router
|
||||
from .seed import seed_database
|
||||
from .auth import create_default_admin
|
||||
from .rate_limit import limiter
|
||||
@@ -65,6 +66,7 @@ app.add_exception_handler(RateLimitExceeded, _rate_limit_exceeded_handler)
|
||||
|
||||
# Include API routes
|
||||
app.include_router(router)
|
||||
app.include_router(pypi_router)
|
||||
|
||||
# Serve static files (React build) if the directory exists
|
||||
static_dir = os.path.join(os.path.dirname(__file__), "..", "..", "frontend", "dist")
|
||||
|
||||
Reference in New Issue
Block a user