A simple pyproject.toml initiator
Project description
tomifier
pyproject.toml
is a modern way to create a python package. tomifier
is CLI to initialize a simple Python pyproject.toml file and starting code. The starting code is itself a CLI that can launch a web application.
References:
Installation
pip install tomifier
Usage
Initialize on current Folder:
tomifier init
Initialize on target folder:
tomifier init -o target_folder/
Initialize with a project name and a target folder:
tomifier init --name myproject1 --output target_folder/
The CLI will create the following files and folder structure locally or at the target folder:
.
├── LICENSE
├── MANIFEST.in
├── README.md
├── build.sh
├── mypackage
│ ├── __init__.py
│ ├── cmd
│ │ ├── __init__.py
│ │ ├── root.py
│ │ └── static
│ │ └── index.html
│ └── version.py
├── pyproject.toml
└── setup.py
Sample Output from running the tool
tomifier init --output myproj1
tomifier CLI
Package name [mypackage]: myproject1
Description [My package]: Description for myproject1
Author [Name]:
Author email [name@email.com]:
Homepage [https://github/usernane/repo]:
Comma separated packages (space=None) [click, fastapi, unvicorn[standard]]:
Creating package myproject1 in folder myproj1 with author Name and email name@email.com
Creating folder myproj1
New project iniatialize at: myproj1
Sample generated pyproject.toml
file
[build-system]
requires = ["setuptools", "setuptools-scm"]
build-backend = "setuptools.build_meta"
[project]
name = "myproject1"
authors = [
{ name="Name", email="name@email.com" },
]
description = "Description for myproject1"
readme = "README.md"
license = { file="LICENSE" }
requires-python = ">=3.10, <3.12"
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
]
dependencies = [
"click",
"fastapi",
"unvicorn[standard]"
]
dynamic = ["version"]
[tool.setuptools]
include-package-data = true
[tool.setuptools.dynamic]
version = {attr = "myproject1.version.VERSION"}
readme = {file = ["README.md"]}
[tool.setuptools.packages.find]
include = ["myproject1*"]
exclude = ["*.tests*"]
namespaces = false
[tool.setuptools.package-data]
"myproject1" = ["*.*"]
[project.urls]
"Homepage" = "https://github/usernane/repo"
[project.scripts]
myproject1 = "myproject1.cmd.root:main"
build.sh
build.sh
is a useful bash script to start the build process and deploy the package locally in editable mode.
To run it from a bash terminal type: sh build.sh
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file tomifier-0.0.2.tar.gz
.
File metadata
- Download URL: tomifier-0.0.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35341cae479cb8363e411f4fcc6fb1682d47f072adfbaae823c6782e16e657d6 |
|
MD5 | 2e1e8d110f73e5a2040c7157f04004ae |
|
BLAKE2b-256 | 451a9f07e32f43c971cc628903778b264fbf3ed179a8c4b0cfeca6cda5d7da50 |
File details
Details for the file tomifier-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: tomifier-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2fdcc8318294433f8ed7a76ffb7660be8c261b2c8c186ebfba12b2fb32855a7 |
|
MD5 | 9a04a32b13fe2089b1f7e5cc06f8c651 |
|
BLAKE2b-256 | e7f867046575a23ec51d19cbfced0f8ac4c0066dc2a326a12b462881e54a9332 |