Skip to main content

Generate elegant, bleeding-edge, ready-to-use Python projects with seamless CI/CD, fit for 2021+.

Project description

Tyrannosaurus Reqs

Version status License PyPI - Python Version Docker GitHub release (latest SemVer including pre-releases) Latest version on PyPi Documentation status Build & test Travis Maintainability Coverage (coveralls) Coverage (codecov)

An opinionated, forwards-looking Python template for 2021.
Generate elegant, ready-to-use Python projects that have excellent continuous integration and deployment.

This is an upgraded, trimmed-down, modern alternative to cookiecutter built with Poetry, Tox, and Github Actions. No legacy files or tools.

Don’t make 55 commits trying to configure Travis, Docker, or readthedocs. Just use tyrannosaurus new

pip install tyrannosaurus
tyrannosaurus new projectname --user gituserororg --track

Tyrannosaurus will then list final manual steps like adding API keys.
(--track will git track gituserororg/projectname.)

Main behavior / features:

Generated projects are integrated with various tools (from PyPi) and external CI/CD/code-quality systems. Github Actions are used by default, but config files for Travis and Azure Pipelines are also provided. You can swap out, modify, or disable anything as you see fit. See the docs 📚 for more information.

By default, here’s how your new project will behave:

  • Commit ⇒ Files are linted and verified for integrity
  • Make a pull request ⇒ Code is built and tested
  • Push to the main branch ⇒ Code is built and tested; code quality, coverage, and security badges are updated
  • Make a Github release ⇒ Artifacts are sent to Github, PyPi, DockerHub, Github Packages, and readthedocs
  • tox ⇒ Tests are run locally
  • tyrannosaurus sync ⇒ Project metadata is synced to pyproject.toml
  • tyrannosaurus update ⇒ New dependency versions from PyPi and/or Conda are listed

Full features / integrations:

† Currently, the Azure pipeline config only builds a Docker image.
Temporary issue in safety

Syncing to pyproject.toml:

Note: This feature is only partly complete.

Tyrannosaurus has an optional sync command that synchronizes metadata from pyproject.toml to other files, so that all of your metadata is in pyproject.toml. There are 16 available target files, including docs/conf.py, tox.ini, .pre-commit-config.yaml, readthedocs.yml, .travis.yml, and __init__.py. Settings like dev dependencies, project version, license headers, and preferred line length can be listed exactly once, in pyproject.toml.

Tyrannosaurus itself can be included as a dependency (but is not by default). Running tyrannosaurus build will run poetry lock, synchronize project metadata (via sync), build, run tests, install, and clean up. Target files can be disabled in [tool.tyrannosaurus.targets].

Building your project locally:

To run locally, install Poetry and Tox (pip install tox). Then just type tox to build artifacts and run tests. To create an initial Anaconda recipe or environment file, run tyrannosaurus recipe or tyrannosaurus env.

Similar tools:

  • hypermodern-python, a Python template that is similarly modern. It looks solid but has fewer integrations. A few choices were different, such as the use of Nox. Nox has less traction and <500 Github stars, and was not updated since 2020-04 as of 2020-12.
  • cookiecutter-hypermodern-python
  • cookiecutter, which still uses setup.py
  • python-blueprint, which is useful to look through but still uses setup.py

Contributing:

New issues and pull requests are welcome. Please refer to the contributing guide and security policy.
Generated with tyrannosaurus: tyrannosaurus new tyrannosaurus

                                              .++++++++++++.
                                           .++HHHHHHH^^HHH+.
                                          .HHHHHHHHHH++-+-++.
                                         .HHHHHHHHHHH:t~~~~~
                                        .+HHHHHHHHHHjjjjjjjj.
                                       .+NNNNNNNNN/++/:--..
                              ........+NNNNNNNNNN.
                          .++++BBBBBBBBBBBBBBB.
 .tttttttt:..           .++BBBBBBBBBBBBBBBBBBB.
+tt+.      ``         .+BBBBBBBBBBBBBBBBBBBBB+++cccc.
ttt.               .-++BBBBBBBBBBBBBBBBBBBBBB++.ccc.
+ttt++++:::::++++++BBBBBBBBBBBBBBBBBBBBBBB+..++.
.+TTTTTTTTTTTTTBBBBBBBBBBBBBBBBBBBBBBBBB+.    .ccc.
  .++TTTTTTTTTTBBBBBBBBBBBBBBBBBBBBBBBB+.      .cc.
    ..:++++++++++++++++++BBBBBB++++BBBB.
           .......      -LLLLL+. -LLLLL.
                        -LLLL+.   -LLLL+.
                        +LLL+       +LLL+
                        +LL+         +ff+
                        +ff++         +++:
                        ++++:

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

tyrannosaurus-0.8.5.tar.gz (38.7 kB view hashes)

Uploaded Source

Built Distribution

tyrannosaurus-0.8.5-py3-none-any.whl (48.6 kB view hashes)

Uploaded Python 3

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