Skip to main content

A modern Python project forge with pre-configured tooling and CI/CD.

Project description

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.

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:

  1. 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.

  2. Engineering Teams - Establish a unified development workflow across your organization with standardized tooling and automation.

  3. AI/ML Engineers & Data Scientists - Prototype in notebooks, then transition seamlessly into robust, maintainable pipelines using PyFoundry.

  4. DevOps & Automation Enthusiasts - Pre-wired for CI-ready workflows. If you encounter issues, refer to the Troubleshooting Guide.

  5. 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:

  1. Launching a New Project - Skip setup boilerplate and get a production-grade structure instantly.

  2. Turning Notebooks into Codebases - Perfect for converting research prototypes (Colab/Marimo) into tested, version-controlled modules.

  3. Enforcing Code Quality from Day 1 - Static typing, linting, and Git hooks are already configured.

  4. Building Scalable Applications - Dynaconf, structured logging, and test frameworks make scaling effortless.

  5. Collaborating in Teams - Reduce onboarding friction with shared configs and tooling.

  6. 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:

  1. You’re Writing a One-Off Script - For quick experiments or throwaway scripts, a full project scaffold may be overkill.

  2. You’re Staying Inside Notebooks - If your entire workflow lives in Colab or Jupyter, PyFoundry adds unnecessary structure.

  3. You Need a Non-Python Stack - It’s built for Python projects only.

  4. You Already Have Deep Customization - If your team uses a heavily customized setup, integrating PyFoundry might conflict with existing conventions.

Quick Start

  1. Install the latest framework for Python if you haven’t already:

    $ pip install -u pyfoundry
  2. Initialize your project:

    $ pyfoundry init
  3. Create 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.

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

pyfoundry-0.1.0.tar.gz (58.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfoundry-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file pyfoundry-0.1.0.tar.gz.

File metadata

  • Download URL: pyfoundry-0.1.0.tar.gz
  • Upload date:
  • Size: 58.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for pyfoundry-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e714d50d23798fb8b68f68be56838864754bfa80c646631cd70327112b9e621a
MD5 690f32ee9609834f527234cb0fc1f9ce
BLAKE2b-256 5634ef68a8d62cb685dfd3a4da3a0f86e4a46cac71663a1b32797735403914e0

See more details on using hashes here.

File details

Details for the file pyfoundry-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: pyfoundry-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for pyfoundry-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 addd5146ab7a09a2a7fa20447a26591e1a28eeef97405f5a187c2af657ca585c
MD5 05843b0ebbc4bd081150f8ab46e692a8
BLAKE2b-256 f90979237f6883cbba153d928f8b54bb9c3a86a18dce61612704d4057d6c79fc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page