Skip to main content

Sets up a new (python) project using a template

Project description

acme-project-create

Sets up a new (python) project using a template.

Uses a three-step process:

  1. Template files are copied to the -target-dir location from a --template-dir-path directory. Default template for a python project is included in the package.
  2. Directory names in the template following the pattern {{<variable>}} are substituted with value provided by the user.
  3. Filenames in the template directory that end with j2template (e.g. pyproject.toml.j2template) are assumed to be Jinja2 templates and a file is generated in the target location with variable substitutions provided by the user i.e. pyproject.toml.

And that's it.

Note: to provide all values to compile the template the template dir needs to contain a template_manifest.py file that must implement a function:

def configure_parser(parser: argparse.ArgumentParser) -> argparse.ArgumentParser

which takes an existing instance of ArgumentParser, adds arguments specific to the template and returns the parser object.

Default template

The default template makes several notable choices:

  • Uses venv for virtual environments and .venv dir to store built environment
  • Uses .env file for setting up environment variables
  • Uses setuptools for packaging
  • Uses pytest for testing
  • Uses mkdocs for documentation

Problem

Setting up all files to create a new project is time consuming and involves lots of small technical choices.

Why use this project?

You are probably better off using Cookiecutter

Project template

This project has been setup with acme-project-create, a python code template library.

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

acme_project_create-0.0.2.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

acme_project_create-0.0.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file acme_project_create-0.0.2.tar.gz.

File metadata

  • Download URL: acme_project_create-0.0.2.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.4

File hashes

Hashes for acme_project_create-0.0.2.tar.gz
Algorithm Hash digest
SHA256 72fc325acfa3b26ec13d298bb468a1715936e76aa8961ba5ca50fe52c91ba26f
MD5 e4da5bebc8ac9b2697bc5f7b151a9d2a
BLAKE2b-256 6019f7fab1acf0bb7efb3ee1ee784b6a4d1a91d4b5c92229b6b05385144bb6ba

See more details on using hashes here.

File details

Details for the file acme_project_create-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for acme_project_create-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0af7177f5571750135c4fe18c2a432807bee87948903f6a454a157e3284353a2
MD5 186724e874414964fa178b26af55d500
BLAKE2b-256 90db7856d8fd0d05458443328cfe4051f3891f126784e423f2b3eec6b18fa41e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page