Skip to main content

fig-py is a command line tool for generating skeletons of python packages from a directory of jinja templates.

The interface is easy:

fig -p my-new-project -g my-github-user-name

This will initialize a highly-opinionated github repository, with your command line args inserted in relevant places throughout the following directory tree:

my-new-project
├── README.md
├── build_docs.sh
├── docs
│   ├── Makefile
│   ├── _static
│   │   └── logo.png
│   ├── _themes
│   │   ├── flask_theme_support.py
│   │   └── kr
│   │       ├── autotoc.html
│   │       ├── layout.html
│   │       ├── relations.html
│   │       ├── sidebarlogo.html
│   │       ├── static
│   │       │   └── flasky.css_t
│   │       └── theme.conf
│   ├── conf.py
│   ├── index.rst
│   └── install.rst
├── requirements.txt
├── setup.py
├── src
│   └── __init__.py
└── tests
    ├── README.md
    ├── __init__.py
    ├── fixtures
    │   └── README.md
    └── tests.py

This default template comes with nose for testing, sphinx for docs (with Kenneth Reitz’s Template), travis-ci for continuous integration and pandoc for rendering your markdown README.md on py-pi.

You can build and serve the docs by running build.sh.

Customizing

If you’d like, you can also create your own folder of jinja templates and pass it in as follows:

fig -p my-new-project -g my-github-user-name -t path/to/my-template/

You can also pass in a series of custom json key-value pairs if you want to add extra context:

fig -p my-new-project -g my-github-user-name -t my-template/ -k "{'key1':'value1', 'key2':'value2'}"

These values can be inserted anywhere in your custom templates using standard jinja syntax:

{{ key1 }}, {{ key2 }}

Heres the full cli specification:

usage: fig [-h] [-p PROJECT_NAME] [-g GITHUB_USER] [-a AUTHOR] [-e EMAIL]
              [-d DESCRIPTION] [-t TEMPLATE_PATH] [-k KWARGS]

Initialize a python repository.

optional arguments:
  -h, --help            show this help message and exit
  -p PROJECT_NAME, --project-name PROJECT_NAME
                        The name of your project.
  -g GITHUB_USER, --github-user GITHUB_USER
                        Your github user name.
  -a AUTHOR, --author AUTHOR
                        Your name.
  -e EMAIL, --email EMAIL
                        Your email.
  -d DESCRIPTION, --description DESCRIPTION
                        The projects' description.
  -t TEMPLATE_PATH, --template TEMPLATE_PATH
                        A directory of custom templates
  -k KWARGS, --kwargs KWARGS
                        A json string or a .json / .yml filepath of custom
                        kwargs

Installation

pip install fig-py

TODO: * Don’t rely on os.system() * create repository on github * activate virtualenv * webhooks for read the docs / s3 upload for data / binaries.

Release files for fig-py 0.0.4

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

Source distribution (sdist)

Source distribution for fig-py 0.0.4
File Size Uploaded
fig-py-0.0.4.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fig-py 0.0.4
File Interpreter ABI Platform
fig-py-0.0.4.macosx-10.9-intel.exe Details

Total release size: 133.1 kB

Release files / fig-py-0.0.4.tar.gz

Download URL fig-py-0.0.4.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
71511b6c6237198a4385f3d6560a4552b03853bde1b015f3c1f1120f9b4a8d2e
BLAKE2b-256 checksum
How to use checksums
380b15f7eeae21e9040ec1312456437d9176c0579196563413e6260538b3c0f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / fig-py-0.0.4.macosx-10.9-intel.exe

Download URL fig-py-0.0.4.macosx-10.9-intel.exe
Size 127.7 kB
Tags Source
SHA-256 checksum
How to use checksums
2411849001d601ca49f568ad41d7f3c205a82630935b686a9f8aff8638a21052
BLAKE2b-256 checksum
How to use checksums
ca3f6a012bcc649eb8712190f8113265da9be25100d5a8c83354acd6af03f5af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

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