Skip to content

A Cookiecutter (project template) for creating a Pyramid starter project with choices for template language (Jinja2, Chameleon, or Mako). Uses SQLAlchemy as backend and URL dispatch for routing. Session management, CSRF protection, Authentication and Authorization included out of the box

Notifications You must be signed in to change notification settings

ephraimbuddy/cookiecutter-pyramid

Repository files navigation

About This Fork🍴

This is a fork of https://github.com/Pylons/pyramid-cookiecutter-starter with decisions made on the type of persistent backend and url mapping scheme to use, with session management, authentication and authorization features.

cookiecutter-pyramid

Dev Travis CI Status

A Cookiecutter (project template) for creating a Pyramid starter project.

Customizable options upon install include choice of:

  • template language (Jinja2, Chameleon, or Mako)

Decisions made for you:

  • Session management with pyramid_nacl_session
  • SQLAlchemy as the ORM
  • WTForms as form library
  • Bootstrap 4
  • Automatic csrf protection
  • Inbuilt Authentication and Authorization mechanism

Requirements

Versions

This cookiecutter has several branches to support new features in Pyramid or avoid incompatibilities.

  • master aligns with the latest stable release of Pyramid, and is the default branch on GitHub.
  • dev aligns with the master branch of Pyramid, and is where development takes place.
  • x.y-branch aligns with the x.y-branch branch of Pyramid.

Usage

  1. Generate a Pyramid project, following the prompts from the command.

    $ cookiecutter gh:ephraimbuddy/cookiecutter-pyramid

    Optionally append a specific branch checkout to the command:

    $ cookiecutter gh:ephraimbuddy/cookiecutter-pyramid --checkout dev
  2. Create a virtual environment, upgrade packaging tools, and install your new project and its dependencies. These steps are output by the cookiecutter and are written to the file in <my_project>/README.txt, and are slightly different for Windows.

    # Change directory into your newly created project.
    $ cd <my_project>
    # Create a Python virtual environment.
    $ python3 -m venv env
    # Activate the virtual environment.
    $ source env/bin/activate
    # For windows, activate with:
      env\Scripts\activate
    # Upgrade packaging tools.
    $ pip install --upgrade pip setuptools
    # Install the project in editable mode with its testing requirements.
    $ pip install -e ".[testing]"
    # Generate your first revision
    $ alembic -c development.ini revision --autogenerate -m "init"
    # Upgrade the revision
    $ alembic -c development.ini upgrade head
    # Load default data into the database using a script.
    $ initdb development.ini
  3. Run your project's tests.

    $ pytest
  4. Run your project.

    $ pserve development.ini

About

A Cookiecutter (project template) for creating a Pyramid starter project with choices for template language (Jinja2, Chameleon, or Mako). Uses SQLAlchemy as backend and URL dispatch for routing. Session management, CSRF protection, Authentication and Authorization included out of the box

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published