Skip to main content

Create Plone codebases (projects, add-ons, documentation) with ease!

Project description

Plone Logo

Cookieplone 🍪

PyPI PyPI - Python Version PyPI - Wheel PyPI - License PyPI - Status

Tests

GitHub contributors GitHub Repo stars

Welcome to Cookieplone, a powerful wrapper around Cookiecutter designed to streamline the development of Plone codebases. Whether you're building a backend add-on, a new Volto add-on, a full project with both backend and frontend, Cookieplone simplifies the process using robust Cookiecutter templates.

Key features 🌟

Cookieplone offers the following key features for each audience.

For users

  • One stop for all Plone templates: Cookieplone helps you find the correct template to start your new Plone project.
  • Simplified usage: Cookieplone provides an enhanced experience over standard Cookiecutter usage by offering predefined sane defaults and a unified approach to generating various Plone projects.
  • Batteries included: No need to install lots of dependencies. Run uvx cookieplone, and you will quickly generate your codebase.

For template creators

  • Built-in validators: Includes built-in validators to ensure user inputs are correct.
  • Jinja2 filters: Includes Jinja2 filters for advanced template control.
  • Subtemplates: Mechanism to easily instantiate subtemplates within cookiecutter hooks -- i.e. post_gen_hook -- , facilitating greater code reuse.

Installation 💾

Set up your system with Plone's Prerequisites for installation.

Usage 🛠️

Use uvx (command installed by uv) to run cookieplone and see all available template options:

uvx cookieplone

It is also possible to run a specific version of Cookieplone:

uvx cookieplone@0.9.3

Cookieplone will walk you through the necessary steps, using sensible defaults and offering customization options where needed.

Use options to avoid prompts

Cookieplone will ask a lot of questions. You can use some of its options to avoid repeatedly entering the same values.

--no-input

You can use the --no-input option to make Cookieplone not prompt for parameters and only use cookiecutter.json file content.

--replay and --replay-file

You can use the options --replay and --replay-file to not prompt for parameters and only use information entered previously or from a specified file. See Replay Project Generation in the cookiecutter documentation for more information.

Specify a template

You can also specify other templates.

Template Description Command
backend_addon Create a Plone add-on to be used with the backend. uvx cookieplone backend_addon
frontend_addon Create a Plone add-on to be used with the frontend. uvx cookieplone frontend_addon

The updated list of templates can be found at the cookieplone-templates repository.

Configure Cookieplone

Environment Variable Description Example
COOKIEPLONE_REPOSITORY Where to look for templates to be used. COOKIEPLONE_REPOSITORY=/home/plone/cookieplone-templates/ uvx cookieplone
COOKIEPLONE_REPOSITORY_TAG Which tag/branch to use from a remote repository. COOKIEPLONE_REPOSITORY_TAG=experimental uvx cookieplone
COOKIEPLONE_REPO_PASSWORD Password to use when using a remote repository that is password protected. COOKIEPLONE_REPO_PASSWORD=very-secure uvx cookieplone

Contribute 🤝

We welcome contributions to Cookieplone.

You can create an issue in the issue tracker, or contact a maintainer.

Development requirements

See Installation.

Setup

Create a local Python virtual environment with the following command.

make install

Run the checked out branch of Cookieplone

uv run cookieplone

Check and format the codebase

make check

Run tests

pytest is this package's test runner.

Run all tests with the following command.

make test

Run all tests, but stop on the first error and open a pdb session with the following command.

uv run pytest -x --pdb

Run only tests that match test_run_sanity_checks_fail with the following command.

uv run pytest -k test_run_sanity_checks_fail

Run only tests that match test_run_sanity_checks_fail, but stop on the first error and open a pdb session with the following command.

uv run pytest -k test_run_sanity_checks_fail -x --pdb

Support 📢

For support, questions, or more detailed documentation, visit the official Cookieplone repository.

Thank you for choosing Cookieplone for your Plone development needs!

This project is supported by

Plone Foundation Logo

License

The project is released under the 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

cookieplone-1.0.0.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

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

cookieplone-1.0.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file cookieplone-1.0.0.tar.gz.

File metadata

  • Download URL: cookieplone-1.0.0.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cookieplone-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6d0126d25e13d6e0b05a5804f53cb08e611a7456d895d5411bcd8c018f634e86
MD5 21ac38fb81ff230e7d7bd78db668d8eb
BLAKE2b-256 4824243a8921192428939a2971ec59c8973b450482a304b5e1f32511eab24d44

See more details on using hashes here.

File details

Details for the file cookieplone-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: cookieplone-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for cookieplone-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87c1182c218cf33ef7f9469da1fbcd7497ce0abd2b75061c6753a8ad0d5951ae
MD5 35c9b11edd42a7545bf5630f5b1496ff
BLAKE2b-256 10a4f95413524364e69aa3670d887d782dccd7256446228621541334a2677f86

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