Skip to main content

🚀 PyServInit - Project Bootstrapper

pyservinit is a Python-based utility script for initializing a backend project with a standardized structure. It creates directories, touches empty boilerplate files, and copies template files into a new project folder.

📦 Features

  • Creates a structured directory tree for a new project.
  • Populates essential files (Dockerfile, docker-compose.yaml, main.py, etc.).
  • Loads content from .template files bundled in pyservinit.templates.
  • Automatically sets executable permissions for shell scripts.
  • Easy to use via command line.

📁 Project Structure Created

<project-name>/
├── docker-compose.yaml
├── Dockerfile
├── requirements.txt
├── push.sh
├── data/
│   ├── request_data/
│   └── sample_data/
├── src/
│   ├── api/
│   │   ├── __init__.py
│   │   └── api.py
│   ├── config/
│   │   ├── __init__.py
│   │   └── constants.py
│   ├── core/
│   │   └── __init__.py
│   ├── main.py
│   ├── mapper_classes/
│   │   ├── __init__.py
│   │   ├── input_classes.py
│   │   └── output_classes.py
│   ├── misc/
│   ├── tests/
│   │   └── __init__.py
│   └── utils/
│       ├── __init__.py
│       └── utils.py

🛠 Usage

python path/to/pyservinit.py <project-name>

Example:

python pyservinit.py my-backend-service

If my-backend-service already exists, the script will abort to prevent overwriting.


📄 Templates

The script relies on templates stored in pyservinit.templates (an importable Python package resource).

Files like these are included:

  • Dockerfile.template
  • main.py.template
  • push.sh.template
  • etc.

You can add more .template files to the pyservinit/templates/ directory and either:

  • Map them explicitly in DESTINATION_MAP
  • Or have them default to src/misc/<template-name> after removing .template

🧩 Dependencies

Ensure pyservinit.templates is installed or accessible as a Python package.

📌 Notes

  • It is suitable for backend services in microservice-style architectures or for setting up ML inference services.
  • Shell script files (e.g., push.sh) are made executable automatically by the script.

Release files for pyservinit 0.1.3

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

Source distribution (sdist)

Source distribution for pyservinit 0.1.3
File Size Uploaded
pyservinit-0.1.3.tar.gz 4.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyservinit 0.1.3
File Interpreter ABI Platform
pyservinit-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / pyservinit-0.1.3.tar.gz

Download URL pyservinit-0.1.3.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
392cc2eaef17e240cbc61f6afbad8c68ea6aea0de51b9a0eaa14abc31a9a4ad4
BLAKE2b-256 checksum
How to use checksums
206dc0ac0e3fb85f0c91938f1d11e7d54340f07eabd2f5bdf49b392bc06c3bc5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release files / pyservinit-0.1.3-py3-none-any.whl

Download URL pyservinit-0.1.3-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19f87d707ef9d319470ffb6e006ba495ce2e2ecb7d71c5dfdc9eabe5ccfd7e47
BLAKE2b-256 checksum
How to use checksums
4ce231d5ced68fcbf20476574d84038480c53b05def3b08ed4561b109ae847e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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