Skip to main content

Manage .pyc files in Django project

Project description

https://img.shields.io/pypi/v/django-pyc.svg https://travis-ci.org/dex4er/django-pyc.svg?branch=master https://readthedocs.org/projects/django-pyc/badge/?version=latest https://img.shields.io/pypi/pyversions/django-pyc.svg https://img.shields.io/pypi/djversions/django-pyc.svg

django-pyc

django-pyc is a package that implements additional commands for Django’s manage.py command.

django-pyc allows to remove or recompile all .pyc files in the project or Python libraries.

Installation

Install with pip or pipenv:

pip install django-pyc

Add django_pyc to your installed apps in your settings.py file:

INSTALLED_APPS = [
    'django_pyc',
    ...
]

Commands

clearpyc

Clears .pyc files from the project.

Options:

--noinput
Do NOT prompt the user for input of any kind.
-f, --force
Force the removing files without user interaction.
-p, --with-pythonpath
Remove also PYTHONPATH libraries.
path
Directories with libraries

Example:

Run command for application directory only, without prompts and list processed files:

./manage.py clearpyc --noinput --verbosity 2 application

compilepyc

Compiles .pyc files in the project.

Options:

-f, --force
Force the compiling files even if timestamps are up-to-date.
-p, --with-pythonpath
Compile also PYTHONPATH libraries.
path
Directories with libraries

Example:

Run command Run command for application directory only and list processed files:

./manage.py compilepyc --verbosity 2 application

License

Copyright © 2014, 2019, Piotr Roszatycki

This software is distributed under the GNU Lesser General Public License (LGPL 3 or greater).

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

django-pyc-1.1.0.tar.gz (16.4 kB view hashes)

Uploaded source

Built Distribution

django_pyc-1.1.0-py2.py3-none-any.whl (7.4 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page