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.2.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.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyfoundry-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d040619d9810d5daa86b2f9e5194140b88ec0fc4de6c62cbac7dd97d341f4fb2
MD5 a08db87b4c88d2e9262d59a43a88a8b1
BLAKE2b-256 7147f66bb81fd731bc8e72f7d049dedd56bc86023eeb31d3155123e30f278a19

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyfoundry-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7ce711524fe7fb87fea77c45456a1ff29ae207e54a87f3e93ff9463b2fa60c6
MD5 fd9c4f67729ff5fa7a8a4a504696e16a
BLAKE2b-256 3d084809a7d1e85fb0c4b65a5910eeca2c32168052ed5bc01649effa4863e364

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