Metadata-Version: 2.1
Name: python-bridge
Version: 0.0.23
Summary: A Python tool to abstract your Django infrastructure.
Author-email: Caelean Barnes <caeleanb@gmail.com>, Evan Doyle <evanmdoyle@gmail.com>
Project-URL: Homepage, https://github.com/never-over/bridge
Project-URL: Issues, https://github.com/never-over/bridge/issues
Keywords: python,deployment,local,infrastructure,postgres,django,architecture
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: docker ==7.0.0
Requires-Dist: psycopg[binary] ==3.1.18
Requires-Dist: redis ==5.0.3
Requires-Dist: celery ==5.3.6
Requires-Dist: flower ==2.0.1
Requires-Dist: rich ==13.7.1
Requires-Dist: pydantic ==2.6.4
Requires-Dist: dj-database-url ==2.1.0

# 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
```bash
pip install python-bridge
```
### Usage
Adding bridge to your project is incredibly simple:
```python
from bridge.django import configure

configure(locals())
```


The next time you start up your application, bridge will create and configure local infrastructure for you:
```bash
> ./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:
```bash
bridge init render
```
and bridge will create all the configuration necessary for you to immediately deploy to [Render](https://render.com/).

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]`

