Skip to main content

Work library for Forge

Project description

forge-work

A single command to run everything you need for Django development at once.

Forge work command example

The following processes will run simultaneously (some will only run if they are detected as available):

Installation

Forge installation

The forge-work package is a dependency of forge and is available as forge work.

If you use the Forge quickstart, everything you need will already be set up.

The standard Django installation can give you an idea of the steps involved.

Standard Django installation

This package can be used without forge by installing it as a regular Django app.

First, install forge-work from PyPI:

pip install forge-work

Then add it to your INSTALLED_APPS in settings.py:

INSTALLED_APPS = [
    ...
    "forgework",
]

Now instead of using the basic manage.py runserver (and a bunch of commands before and during that process), you can simply do:

python manage.py work

Processes

Runserver

The key process here is still manage.py runserver. But, before that runs, it will also wait for the database to be available and run manage.py migrate.

forge-db

The forge-db package uses Docker to run a local Postgres database.

If forge-db is installed, it will automatically start and show the logs of the running database container.

forge-tailwind

The forge-tailwind package compiles Tailwind CSS using the Tailwind standalone CLI.

If forge-tailwind is installed, it will automatically run the Tailwind compile --watch process.

package.json

If a package.json file is found and contains a watch script, it will automatically run. This is an easy place to run your own custom JavaScript watch process.

Stripe

If a STRIPE_WEBHOOK_PATH env variable is set then this will add a STRIPE_WEBHOOK_SECRET to .env (using stripe listen --print-secret) and it will then run stripe listen --forward-to <runserver:port/stripe-webhook-path>.

Ngrok

If an NGROK_SUBDOMAIN env variable is set then this will run ngrok http <runserver_port> --subdomain <subdomain>.

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

forge-work-0.3.0.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

forge_work-0.3.0-py3-none-any.whl (6.8 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