Skip to content

Hexafuchs/python-package-template

 
 

Repository files navigation

:package_description

Latest Version on PyPI GitHub Tests Action Status GitHub Code Style Action Status Monthly Downloads

This repo can be used to scaffold a Python package. Unless you are a member of Hexafuchs, please use the Original Template by Microsoft or edit out any references to us.

Follow these steps to get started:

  1. Press the "Use this template" button at the top of this repo to create a new repo with the contents of this skeleton.
  2. Run "php ./configure.php" to run a script that will replace all placeholders throughout all the files.
  3. Have fun creating your package.

Note: Remember to activate discussions and pages in the repository settings. Set pages to workflow.

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

You can install the package via poetry (or another tool of your choosing):

poetry add :package_name

Usage

import :package_slug

Checkout the docstring or API docs for more usage information.

Testing

# All
./venv/bin/pytest -m ""

# Unit
./venv/bin/pytest -m "unit"

# Integration
./venv/bin/pytest -m "integration"

# Unit and Integration
./venv/bin/pytest -m "integration or unit"

Development

Installing flit and development dependencies

python3 -m venv venv
./venv/bin/python -m pip install --upgrade pip
./venv/bin/python -m pip install flit
./venv/bin/flit install --only-deps --deps develop

Run linter

./venv/bin/tox

Create documentation locally

Make sure you have installed the dependencies.

cd docs
make clean
make html

You can find the documentation under docs/_build/html/index.html

Installing new dependencies

Either add the dependency to the optional dependencies, or create a new dependency within the [project] namespace, e.g.:

[project]
...
dependencies = [
    "requests==2.32.3"
]

Then, install dependencies with flit:

./venv/bin/flit install --only-deps --deps develop
# or: ./venv/bin/flit install --only-deps --deps all

API Docs

You can find the API Documentation here.

Changelog

Please see CHANGELOG for more information on what has changed recently.

License

The MIT License (MIT). Please see License File for more information.

About

Template for Python Projects

Resources

License

Security policy

Stars

Watchers

Forks

Languages

  • PHP 69.4%
  • Python 30.6%