Skip to main content

pypc

Build Status Wheel Status

The Python3 Package Creator.

Pypc generates standard scaffolding and environment for a Python package.

  • Populates the directory structure show in Usage

  • –strict Installs virtualenv + creates venv directory

  • Installs pyflakes, pep8 to venv

Installation

$ pip install pypc

Usage

Pypc can be used to create the basic structure of your python package. It uses the conventions and file structure outlined in https://packaging.python.org/en/latest/distributing.html. Options also exist to setup virtualenv, pip install dependencies and linters, such as pyflakes and pep8, and generate a pip freeze as requirements.txt.

$ pypc project && ls

CHANGES docs/ examples/ LICENSE MANIFEST.in project/ README.md setup.py tox.in

Alternatively, you can run in minimal mode with -m or –minimal. This only creates a README and setup.py and does not require network access (after pypc is installed).

# Minimal install

$ pypc -m project && ls

project/ MANIFEST.in README.rst setup.py setup.cfg

In both cases, a project/ subdirectory is populated with an __init__.py.

Finally, pypc provides a strict mode which installs and configures virtualenv and specified linters as dependencies. This may be combined with minimal mode:

$ pypc -sm project

Options

usage: pypc [-h] [-v] [-m] [-s] [–venv VENV] [–path PATH] [–author AUTHOR]

[–email EMAIL] [-V VERSION] [–desc DESC] [–url URL] [–rm README] [–fs FS] pkgname

If you only want to create a package with a setup.py (no virtual env, etc), use the -m or –minimal flag.

Note: -v outputs the version of pypc whereas -V or –version is used to

specify the initial version of the package you are creating. This is slightly confusion, and improvements are welcome.

Library

Pypc can be imported and used as library.

>>> from pypc.create import Package
>>> p = Package("pkgname", path="~/optional") # defaults to os.getcwd()
>>> p.new(**{'readme': 'README.md'}) # see pypc.settings.DEFAULTS for a list of default options (key,vals)

Philosopy

  • KISS. Small and simple enough (i.e. Flask/webpy, not django) that it can be integrated into pip,

  • Defaults. a default modus of operandi which works offline,

  • PEP 20. “There should be one– and preferably only one –obvious way to do it.” In this respect, the general file structure should remain static and accept overrides/overloading of templates and if specific modules/packages (like flask) require specific (additional) file structure, a builder can import/bootstrap using pypc (as it would pip)

Standards

Resources about the standards and walkthroughs:

Alternatives

Questions for you

  1. Does the file structure pypc generates break any conventions?

  2. Is the code for pypc readable/accessible?

  3. Feature suggestions? (would love to auto-init venv)

Disclaimer

Pypc is a pre-alpha proof of concept. It’s slow as it installs pyflakes, pep8, virtualenv sets up a virtualenv, and then generates a freeze list of requirements). Right now there is little to no test-coverage; being it is a proof of concept, I’ll try to continue as TDD.

Discussion

Join the conversation! Other design considerations and details can be found on the pypa mailing list: https://groups.google.com/forum/#!searchin/pypa-dev/mek/pypa-dev/eaku1xvUVHU/Kbj_17sP23kJ

Metadata

Release files for pypc 0.1.50

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

Source distribution (sdist)

Source distribution for pypc 0.1.50
File Size Uploaded Provenance
pypc-0.1.50.tar.gz 14.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for pypc 0.1.50
File Interpreter ABI Platform
pypc-0.1.50-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 30.1 kB

Release files / pypc-0.1.50.tar.gz

Download URL pypc-0.1.50.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
bdfd4b5245bd826112983cb0177b609a17c4a52f97bb1abb958f3e6121a55260
BLAKE2b-256 checksum
How to use checksums
018f119d8275d051a262216b56c84ba42b9861a0845d08daa80ef728ca650e6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pypc-0.1.50-py2.py3-none-any.whl

Download URL pypc-0.1.50-py2.py3-none-any.whl
Size 15.4 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f6fddad5c49ed762d9bf9407d002a08c727737eb07798dc9f3475af3fcb3a150
BLAKE2b-256 checksum
How to use checksums
50a2a664f04a7aca9fca6d8f4c7daf5d0e749131cb12a1cdf7a17487f16bb29d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pypc 0.1.50

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.

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