Skip to main content

A Python tool to abstract your Django infrastructure.

Project description

bridge


Automate your local and deployed infra in one line.

#todo add gif

[docs]

What is bridge?

Bridge enables you to seamlessly run and deploy all the infrastructure you need for a complete Django project.

  • One line of copy-paste configuration
  • Local Postgres database automatically configured and connected
  • Local Redis and Celery instances automatically configured and connected
  • Easy one-command deploy configuration to Render

Installation

pip install python-bridge

Usage

Adding bridge to your project is incredibly simple:

from bridge.django import configure

configure(locals())

The next time you start up your application, bridge will create and configure local infrastructure for you:

> ./manage.py runserver

Setting up service bridge_postgres...
[12:00:00]  Image postgres:12 pulled
[12:00:00]  Container bridge_postgres started
[12:00:00]  bridge_postgres is ready
Service bridge_postgres started!
Setting up service bridge_redis...
[12:00:00]  Image redis:7.2.4 pulled
[12:00:00]  Container bridge_redis started
[12:00:00]  bridge_redis is ready
Service bridge_redis started!
Setting up service bridge_celery...
[12:00:00]  Local worker started
Service bridge_celery started!
Performing system checks...

System check identified no issues (0 silenced).
Starting development server at http://127.0.0.1:8000/
Quit the server with CONTROL-C.

That's it! You now have all the local infrastructure you need to run your django application.

Deploys

Bridge can also handle deployed configuration for your app as well! Simply run:

bridge init render

and bridge will create all the configuration necessary for you to immediately deploy to Render.

In the future, we'll look into supporting more deployment runtimes such as Heroku, AWS, GCP, Azure, etc.

FAQ

Local: celery logs, psql, flower? Deployed: environment variables, etc.

Advanced usage

  • turn on/off different services
  • specify environment variables?

TODO

  • add support for celery, redis, mailhog/mail, jupyter
  • add support for flask, fastapi, ...
  • add support for pip install python-bridge[redis,flask,etc]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-bridge-0.0.23.tar.gz (29.4 kB view hashes)

Uploaded Source

Built Distribution

python_bridge-0.0.23-py3-none-any.whl (36.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page