piccolo_docker
Easily spin up databases for your Piccolo project using Docker
Requirements
Setup
- Clone this repo
- Open
.env - Add database name
- Add password. If you don't a random password will be generated that can be seen with
docker inspect --format="{{index .Config.Env 0}}" your_container_name - Change the unique container name if you don't want to use the default
- To add use this app to your Piccolo project, add it to your
AppRegistryinpiccolo_conf.pywith:APP_REGISTRY = AppRegistry(apps=["piccolo_docker.user.piccolo_app"])
Usage
-
piccolo dockerdb createcreates new postgres container with your piccolo database. -
piccolo dockerdb stopstops the docker container. -
piccolo dockerdb startstarts the docker container. -
piccolo dockerdb destroydestroys the docker container. This is irreversible.
Tests
Simply run:
pytest -vv tests/
For the nox tests you'll probably need pyenv and all versions of python that are declared inside noxfile.py
Improvements
- Test against multiple versions of postgres
- Test against more versions of python.
To Contribute
- Fork the repo
- Have a look around
- Make sure you install pre-commit
- Do a small PR for early feedback
- Enjoy!
Metadata
Release files for piccolo-docker 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| piccolo_docker-0.1.0.tar.gz | 7.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| piccolo_docker-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.5 kB
Release files / piccolo_docker-0.1.0.tar.gz
| Download URL | piccolo_docker-0.1.0.tar.gz |
|---|---|
| Size | 7.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0972b2abf896bc4ec61b2482a2ca6e23ff1503389c92037250dbed53fdaeb1a0
|
|
BLAKE2b-256 checksum How to use checksums |
bee573e6fcfd41a199e20245d4677abfcfa3fdd26eda52538fc8b32ed2ffc0bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.7.1 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1
|
Release files / piccolo_docker-0.1.0-py3-none-any.whl
| Download URL | piccolo_docker-0.1.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7191be35f0850444a45638edbb536eec4d29b45af5eb2f5ba37223911c7bba8d
|
|
BLAKE2b-256 checksum How to use checksums |
ca663860e082e14b8fe82b9031bfbf0f4ce514f45e358ed93dea6e3ab54703d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.7.1 requests/2.26.0 setuptools/58.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.1
|