Skip to main content

A quick way to compile your Python project into it's most compact form. Built on the great python-minify package.

Project description

Python Project Minify

GitHub releases PyPI release License: MIT

Compile your python project into the most compact version it can be. This package internally uses the great Python Minifier package.

Installation

Install using PIP

pip install python-project-minify

Note the pip refers to the Python 3 package manager. In environment where Python 2 is also available the correct command may be pip3.

Usage

In console

Run the minify-project command in the terminal. It takes two arguments src and dst.

minify-project path/to/src path/to/dst

Python API

Import python_project_minify:

import python_project_minify

It's simple, just provide a source and destination path:

python_project_minify.directory('path/to/src', 'path/to/dst')

If you are providing paths with backslashes instead of forwardslashes like the example above, make sure to pass it with the r prefix. This way it will be treated as a raw string and won't throw an error.

python_project_minify.directory(r'path\to\src', r'path\to\dst')

Ignoring files and folders:

Create a file called .ppmignore in the root of your project.

## Ignore file in root
file.txt

## Ignore specific file
folder/subfolder/file.txt

## Wildcard ignore file
*file.txt

## Ignore folder in root
/folder

## Ignore specific folder
/folder/subfolder

## Wildcard ignore folder
*/folder

## If for some reason it's necessary to keep the .ppmignore file in the destination folder
PRESERVE_PPMIGNORE

Support

If you found a problem with the software, please create an issue on GitHub.

Maintainer

This project is maintained by Wibo Kuipers.

Contributing

Your contributions are highly appreciated. Please create a pull request on GitHub. Bigger changes need to be discussed with the development team via the issues section at GitHub first.

License

MIT LICENSE

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

python-project-minify-1.0.1.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

python_project_minify-1.0.1-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file python-project-minify-1.0.1.tar.gz.

File metadata

  • Download URL: python-project-minify-1.0.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for python-project-minify-1.0.1.tar.gz
Algorithm Hash digest
SHA256 f1a8256889e2be751b4184d16eee4fa642c07029af634b2c2c889868439caec5
MD5 c05cc9b1d1922d240e61e5d497844c3a
BLAKE2b-256 8e80d9e29c4e66290a7d67e62fafe690f7f09477e27545264b243bdbcc9473f8

See more details on using hashes here.

File details

Details for the file python_project_minify-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_project_minify-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 117e93c049db59b0b24b7fc7ef034d22c6592caadc22c67ac45b405eb9ac45c0
MD5 507083b66793b204a6d4c52d617382cb
BLAKE2b-256 fca928218ca3f88e93237e93e90705da85ac03ef36e7d6bb0d19a0406f78e05b

See more details on using hashes here.

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