Skip to content

A rewrite of the pydeps project, using FastAPI, for deployment on Deta.

Notifications You must be signed in to change notification settings

frabarz/pydeps-deta

Repository files navigation

pydeps (alternative server)

A rewrite of the pydeps project, using FastAPI, and intended for deployment on Deta Space.

This project enables a set of endpoints to get dependency information of python packages published on pypi.org. Specifically, one of these endpoints is intended for use by the pyflow executable.

The deployed version of this repository is available at https://pydeps.frbrz.xyz/
You can use its OpenAPI documentation to explore the available endpoints.

Own instance on Deta

Although the app is available at Deta Discovery, it is not intended for the creation of multiple instances. The preferred way is using the referenced live instance in pyflow, so more versions get cached and are readily available for other users.
However dependencies are a delicate issue and you would do right in not trusting so easily third parties servers. You can still create your own instance, by installing it on the Canvas, or by cloning this repo and pushing a new private project. Or you could even just run it locally.

Run locally

This project uses Deta Base to cache the results of each query for dependencies. To enable cache, you must provide the application with a Deta Project Key, and set it in the environment variable DETA_PROJECT_KEY.
The app will still work without it, but your instance could be rate limited from the pypi API if there are too many requests in a short timespan. Note a request is made for each version, for each package.

You can run the application locally by executing inside the Python virtual environment:

(.venv) $ uvicorn main:app --port 8000

Then you can set the http://localhost:8000/query/ URL on pyflow to use it instead of the official endpoint.

About

A rewrite of the pydeps project, using FastAPI, for deployment on Deta.

Topics

Resources

Stars

Watchers

Forks

Languages