Skip to content

This repository holds a structured dummy Python project with security actions to follow best practices.

License

Notifications You must be signed in to change notification settings

jxdv/python-project-structure

Repository files navigation

A skeleton for a python project I use whenever working on a new project. Feel free to use for your own projects.

Structure

.github directory:

  1. dependabot.yml - Make sure GitHub actions and Python packages are up-to-date.

workflows:

  1. codeql.yml - Searching the code for vulnerabilities and bugs.
  2. guarddog.yml - Scan used Python packages to secure the security of the Supply chain.
  3. lint.yml - Prevent code smells and make the Python code easy to read.

app_name directory:

  1. cli / common / core / db Python local packages - Pretty self-explanatory. More packages can be added based on the purpose of the project.
  2. __init__.py - Treat it as a package.
  3. __main__.py - Main CLI entrypoint.
  4. config.py - Loads secrets / app configuration from environment files etc.
  5. exceptions.py - Defining custom exceptions for the project.

Environment files

  1. .env - Shared environment file.
  2. .env.dev - Environment file for dev purposes.

Requirements files

  1. requirements.txt - Requirements for the actual project.
  2. requirements-dev.txt - Requirements for test / dev purposes.

GitHub miscellaneous

  1. .gitignore - Exclude files from working repository.
  2. README.md - Describe what the project actually does.
  3. LICENSE - License for the project.

Other

  1. ruff.toml - Configuration for Ruff.
  2. Dockerfile - Project build instructions for Docker.

About

This repository holds a structured dummy Python project with security actions to follow best practices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published