Skip to content

breaddaerb/python-project-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Project Setup Steps

This repository provides a simple Python project template following my usual workflow: managed with uv and using top-level package imports.

  1. Initialize project

    uv init

    This creates a basic project scaffold with pyproject.toml.

  2. Configure pyproject.toml Edit pyproject.toml with the following template:

    [build-system]
    requires = ["setuptools>=61.0", "wheel"]
    build-backend = "setuptools.build_meta"
    
    [project]
    name = "python-project-template"
    version = "0.1.0"
    description = "Add your description here"
    readme = "README.md" 
    requires-python = ">=3.11"
    dependencies = []
    
    [tool.uv]
    index-url = "http://your-custom-index/simple/"
    extra-index-url = ["https://pypi.org/simple"]
    allow-insecure-host = ["your-custom-index"]
    
    [tool.setuptools]
    packages = ["python_project"]

    Notes:

    • [build-system] → Controls how the package is built, here using setuptools.
    • [project] → Basic metadata for your package.
    • [tool.uv] → Configure package sources (change to your mirror or private index).
    • [tool.setuptools].packages → which Python packages to include.
  3. Install in editable (development) mode

    uv pip install -e .

    Makes local changes instantly available.

  4. Add dependencies

    uv add requests

    Installs and records package in [project.dependencies].

  5. Import your package

    import python_project.module_name
    from python_project.subpkg import something

    Always use the top-level package name for imports.

About

Python project template: managed with uv and using top-level package imports

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages