Skip to main content

django-fabric is written to make writing fabfiles for django projects easier and faster. It contains the basic stuff one would expect from a django setup with git and virtualenv. The code expects the project to have a certain structure as seen below. It is possible to customize the activation of the virtualenvironment. .. code-block:

project-dir/
  venv/ # virtualenv
  project-package/
  manage.py
  fabfile.py

Installation

Run pip install django-fabric

Usage

There is two options to get get a basic setup, both will make you able to run fab deploy:prod and fab test.

Init script

There is a init script that will guide you through the generation of a basic fabfile that utilises django-fabric. Run it with the command .. code-block:

django-fabric-init

Basic manual setup

Create a fabfile.py in your project directory. You can see example of a fabfile below. If you run into problems with settings where fabric cannot locate settings add sys.path.append(os.path.dirname(__file__)) to your fabfile.

Here is an example of an fabfile .. code-block:

from fabric.decorators import task
from fabric.state import env
from django_fabric import App

env.user = 'web'
env.hosts = ['server1.example.com']

site = App(
    project_paths={
        'prod': '/var/www/example_site',
    },
    urls={
        'prod': 'http://example.com'
    },
    restart_command={
        'prod': 'restart prod'
    },
    project_package='example',
    test_settings='example.settings.test',
)

deploy = task(site.deploy)
test = task(site.test)

Metadata

Release files for django-fabric 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-fabric 2.1.0
File Size Uploaded Provenance
django-fabric-2.1.0.tar.gz 7.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for django-fabric 2.1.0
File Interpreter ABI Platform
django_fabric-2.1.0-py2-none-any.whl Python 2 none any Details

Total release size: 19.6 kB

Release files / django-fabric-2.1.0.tar.gz

Download URL django-fabric-2.1.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
af6333dbf24ef85239a9bc02a47f49c24b1474576b3a430041de4a935b4d5b89
BLAKE2b-256 checksum
How to use checksums
a1c8e6b13038b7f97a1d19cc96775c342a25ee01c39b10d1acdc4694ad886dcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_fabric-2.1.0-py2-none-any.whl

Download URL django_fabric-2.1.0-py2-none-any.whl
Size 12.2 kB
Tags Python 2
SHA-256 checksum
How to use checksums
1724c9b0ec0cc73cf6474c837b08000d798f1c03cadef7df370947a72435d7e6
BLAKE2b-256 checksum
How to use checksums
0f0b6ec49639883a91dc9fd26a2fe76a0def304e14cc2470450f59703d9ec4ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-fabric 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page