Skip to content

A Python-based template designed for streamlining project setup for small python projects, with CI workflows.

License

Notifications You must be signed in to change notification settings

SverreNystad/template_python_application

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PROJECT NAME

Workflow Status (with event) codecov.io top language GitHub language count Project Version

Table of Contents
  1. PROJECT NAME
  2. Introduction
  3. Usage
  4. Installation
  5. Tests
  6. License

Introduction

Usage

python src/main.py

Installation

To install the PROJECT NAME, one needs to have all the prerequisites installed and set up, and follow the setup guild. The following sections will guide you through the process.

Prerequisites

  • Python 3.9 or higher

Setup

  1. Clone the repository
git clone https://github.com/USERNAME/REPONAME.git
cd PROJECT NAME
  1. Create and run a virtual environment (optional but recommended).

    Create the virtual by running the following command.

    python -m venv venv

    To use the virtual environment run the following command

    On Windows:

    source venv/Scripts/activate

    On macOS and Linux:

    source venv/bin/activate
  2. Install the required packages

pip install -r requirements.txt
  1. Create a file called .env in the root directory of the project. Add the following lines to the file:
touch .env
echo "SECRET=SECRET_VALUE" > .env # Remember to change SECRET_VALUE to your actual key

Tests

To run all the tests, run the following command in the root directory of the project:

pytest --cov
coverage html # To generate a coverage report

If you do not want to run api tests, run the following command instead:

pytest -m "not apitest" --cov

License

Licensed under the MIT License. Because this is a template repository, you need to change the license if you want to use it for your own project.

About

A Python-based template designed for streamlining project setup for small python projects, with CI workflows.

Topics

Resources

License

Stars

Watchers

Forks

Languages