PyFoundry
PyFoundry is a modern project template designed to simplify the initial setup of Python projects by providing a solid foundation with best practices built in from day one. It helps you avoid common setup pitfalls and enforces consistency so you can focus on what matters: writing great code.
Why PyFoundry?
Consistency: Includes EditorConfig and Ruff to maintain uniform code style and linting across your team.
Safety: Integrates MyPy for static type checking to catch bugs early.
Automation: Pre-configured pre-commit hooks automate code quality checks.
Productivity: Environment management and logging setup included for scalable projects.
Quality: Built-in testing and code coverage ensure reliability and maintainability.
With PyFoundry, starting your Python project is no longer a hurdle but a streamlined experience that scales from simple scripts to complex AI engineering workflows. For more help getting started, see the full PyFoundry Tutorial.
Repository Links
Source Code: https://github.com/ghimiresunil/PyFoundry.git
Issue Tracker: https://github.com/ghimiresunil/PyFoundry/issues
Features
PyFoundry is equipped with powerful tools and integrations that promote consistency, automation, and maintainability right from the start. These features are grouped into two key areas: code quality & consistency and project automation & scalability.
Code Quality & Consistency
EditorConfig - Ensures consistent indentation, line endings, and formatting across editors and IDEs.
Ruff - A lightning-fast Python linter and formatter.
MyPy - Performs static type checking to catch type-related bugs early.
pre-commit - Automates code quality checks via Git hooks.
Project Automation & Scalability
Dynaconf - Flexible and layered configuration management system.
Fire - Instantly generates CLI interfaces from your Python code.
Logging - Built-in, configurable logging setup for debugging and observability.
Pytest - A mature and powerful testing framework.
Coverage - Tracks code coverage during test runs.
pytest-cov - Integrates coverage directly with pytest.
Tox - Automates testing across different Python environments and dependency sets.
Who Should Use PyFoundry?
PyFoundry is designed for developers and teams who care about clean code, scalability, and production-readiness from day one:
Individual Developers - Whether you’re just getting started or have years of experience, PyFoundry saves you time and enforces best practices out of the box.
Engineering Teams - Establish a unified development workflow across your organization with standardized tooling and automation.
AI/ML Engineers & Data Scientists - Prototype in notebooks, then transition seamlessly into robust, maintainable pipelines using PyFoundry.
DevOps & Automation Enthusiasts - Pre-wired for CI-ready workflows. If you encounter issues, refer to the Troubleshooting Guide.
Open Source Maintainers - Create high-quality packages with consistent linting, testing, and documentation defaults. See Authors for contributors.
When Should You Use PyFoundry?
Use PyFoundry when you want your Python project to start strong, scale smoothly, and stay maintainable:
Launching a New Project - Skip setup boilerplate and get a production-grade structure instantly.
Turning Notebooks into Codebases - Perfect for converting research prototypes (Colab/Marimo) into tested, version-controlled modules.
Enforcing Code Quality from Day 1 - Static typing, linting, and Git hooks are already configured.
Building Scalable Applications - Dynaconf, structured logging, and test frameworks make scaling effortless.
Collaborating in Teams - Reduce onboarding friction with shared configs and tooling.
Automating Dev Workflows - Integrated tools like Tox and pre-commit streamline testing and deployment.
When Not to Use PyFoundry
PyFoundry is powerful—but not always the right fit. Skip it if:
You’re Writing a One-Off Script - For quick experiments or throwaway scripts, a full project scaffold may be overkill.
You’re Staying Inside Notebooks - If your entire workflow lives in Colab or Jupyter, PyFoundry adds unnecessary structure.
You Need a Non-Python Stack - It’s built for Python projects only.
You Already Have Deep Customization - If your team uses a heavily customized setup, integrating PyFoundry might conflict with existing conventions.
Quick Start
Install the latest framework for Python if you haven’t already:
$ pip install -u pyfoundryInitialize your project:
$ pyfoundry initCreate a repository and push your project.
Environment Examples
Sample .env.example file for Dynaconf environment:
ENV_FOR_DYNACONF=dev
DYNACONF_APP_NAME=PyFoundry
Sample .secrets.example file:
[default]
access_key = "my_access_key"
secret_key = "my_secret_key"
db_user_name = "username"
db_password = "password"
[dev]
access_key = "my_access_key-dev"
secret_key = "my_secret_key-dev"
db_user_name = "username-dev"
db_password = "password-dev"
[stage]
access_key = "my_access_key-stg"
secret_key = "my_secret_key-stg"
db_user_name = "username-stg"
db_password = "password-stg"
[prod]
access_key = "my_access_key-prod"
secret_key = "my_secret_key-prod"
db_user_name = "username-prod"
db_password = "password-prod"
Contribute or Follow Along
PyFoundry is evolving (see the Changelog for details). Star the repository, follow development, or contribute by submitting issues and pull requests—see our Contributing Guidelines.
Metadata
Release files for PyFoundry 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyfoundry-0.1.2.tar.gz | 58.0 kB | Without provenance | Details for pyfoundry-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyfoundry-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pyfoundry-0.1.2-py3-none-any.whl |
Total release size: 67.6 kB
Release files / pyfoundry-0.1.2.tar.gz
| Download URL | pyfoundry-0.1.2.tar.gz |
|---|---|
| Size | 58.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d040619d9810d5daa86b2f9e5194140b88ec0fc4de6c62cbac7dd97d341f4fb2
|
|
BLAKE2b-256 checksum How to use checksums |
7147f66bb81fd731bc8e72f7d049dedd56bc86023eeb31d3155123e30f278a19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / pyfoundry-0.1.2-py3-none-any.whl
| Download URL | pyfoundry-0.1.2-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b7ce711524fe7fb87fea77c45456a1ff29ae207e54a87f3e93ff9463b2fa60c6
|
|
BLAKE2b-256 checksum How to use checksums |
3d084809a7d1e85fb0c4b65a5910eeca2c32168052ed5bc01649effa4863e364
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Security for PyFoundry 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.