A python starter package to be used as a template for creating your own python packages.

Overview

Python Starter Package

This is a basic python starter package to be used as a template for creating your own python packages.

Installation

This library is hosted on PyPi and can be installed via pip:

pip3 install PythonStarterPackage

For manual install, see below.

Manual Install

To manually install this package, clone this repo to your local system. After you clone the repo, navigate into the package to where the setup.py file is. Then use pip install -e . command. This will install the package and all its dependencies editable mode. Then you can use the package locally or use it as the starting point for building out your own package.

pip3 install -e .

Usage

You can run the app in your terminal with:

./app.py

You can also import this module into your own project and incorporate it into your own packages. For example:

from python_starter_package import *
python_starter = PythonStarterPackage()
python_starter.run()

Documentation

The purpose of this project is to show you how to create a standard python package from scratch. This project is inspired by Sigma-Coding (https://github.com/areed1192/sigma-coding), it is a great detailed guide on deploying python packages.

Setup

In order to setup the your own standard python package from scratch do the following:

  1. Setup the starter package with the files and folders below:
  • config - Directory containing all configuration files for your package.
  • src/python_starter_package - Core directory containing all the files that make up your program as well as __init__.py which is the entry point to our package.
    • utils - Sub-directory of python_starter_package containing any utility files for your program.
  • test - Directory containing all your test scripts.
  • app.py - Script to run your application.
  • LICENSE - File defining your package's license.
  • README.md - Readme file for documentation.
  • requirements.txt - File defining all the requirements of your package.
  • setup.py - Script to build your package.
  1. Once setup, add the contents and code to the files and directories you created. Copy the contents and code from the PythonStarterPackage available in this repo: https://github.com/mystic-repo/PythonStarterPackage.

Deployment

Do the following to create the deployment for the package.

  1. Create (or overwrite) the requirements.txt document with pipreqs. This is an extremely useful tool because it automatically finds all of the relavent versions of dependencies your package relies on and puts them into the requirements.txt file. If you don't have pipreqs, install it with pip install pipreqs.
pipreqs --force --encoding utf-8
  1. Upgrade setuptools, wheel, and twine (twine will be used in the next part).
pip3 install --upgrade setuptools wheel twine
pip3 install --user --upgrade setuptools wheel twine
  1. Build the package with setup.py.
python3 setup.py sdist bdist_wheel
  1. Test the install of the package.
pip3 install e .
  1. Run app.py to test that the package is working.
./app.py
  1. After testing that it is working, uninstall the package from pip3.
pip3 uninstall PythonStarterPackage

Upload to PyPi

In order to upload to PyPi make sure to setup your PyPi account first. See "PyPi Setup Guide.md" in doc/ for more details. You will also need to have twine installed and upgraded. Once you have all of this setup do the following:

  1. Upload using twine.
twine upload dist/*
  1. Install your package with pip.
pip install PythonStarterPackage

Note: If you get a "Requrements already satisfied..." for PythonStarterPackage when trying to install, it may be because pip still thinks you have the package already installed from the testing earlier. To cleanly break that connection, simply go to ./src/ and delete the PythonStarterPackage.egg-info directory and its contents. Then try uninstalling and reinstalling again:

pip uninstall PythonStarterPackage
pip install PythonStarterPackage
  1. Finally, run the app.py to test that the package is working.
./app.py

Support and Contributions

Our software is open source and free for public use. If you found any of these repos useful and would like to support this project financially, feel free to donate to our bitcoin address.

Bitcoin Address 1: 1GZQY6hMwszqxCmbC6uGxkyD5HKPhK1Pmf

alt text

Owner
Mystic
Mystic
Django Webpack starter template for using Webpack 5 with Django 3.1 & Bootstrap 4. Yes, it can hot-reload.

Django Webpack Starter Hello fellow human. The repo uses Python 3.9.* Django 3.1.* Webpack 5.4.* Bootstrap 4.5.* Pipenv If you have any questions twe

Ganesh Khade 56 Nov 28, 2022
King is a simple boilerplate from a bigger Discord Bot project created for my Discord Server.

King A simple Discord bot boilerplate. King is a simple boilerplate from a bigger Discord Bot project created for my Discord Server. I intend to showc

Xminent 0 Aug 21, 2021
Code Kata Python Template

Code Kata Python Template This is the code kata template for python created by Aula de Software Libre de la Universidad de Córdoba Step 1. Use this re

Sergio Gómez 2 Nov 30, 2021
This is a FastAPI, React, MongoDB stack Boilerplate. It's as glorious as a highland coo.

Coo - F.A.R.M stack BoilerPlate F.A.R.M - FastAPI, React, MongoDB This boilerplate utilizes FastAPI to build a REST API, MongoDB for data storage, and

Peter Waters 2 Feb 06, 2022
A Django project skeleton that is modern and cutting edge.

{% comment "This comment section will be deleted in the generated project" %} Edge A Fantastic Django project starter. Features Ready Bootstrap-themed

Arun Ravindran 827 Dec 15, 2022
A Django starter template with a sound foundation.

SOS Django Template SOS Django Tempalate is a Django starter template that has opinionated and good solutions while starting your new Django project.

Eray Erdin 19 Oct 30, 2022
Combine the power of FastAPI and Django to build a production-ready application capable of utilizing all of the best features of both worlds.

FastAPI and Django Combo This projects aims to combine FastAPI and Django to build a Production ready application capable of utilizing all of the feat

Nsikak Imoh 33 Dec 27, 2022
Bleeding edge django template focused on code quality and security.

wemake-django-template Bleeding edge django2.2 template focused on code quality and security. Purpose This project is used to scaffold a django projec

wemake.services 1.6k Jan 04, 2023
Flask Boilerplate - Material Kit Design | AppSeed

Flask Boilerplate - Material Kit Design | AppSeed

App Generator 45 Nov 18, 2022
A platform for developers 👩‍💻 who wants to share their programs and projects.

Hacktoberfest-2021 A platform for developers 👩‍💻 who wants to share their projects and programs. Hacktoberfest has updated their rules and now this

Mayank Choudhary 40 Nov 07, 2022
A template for some new Python tool or package with a reasonable basic setup.

python-app-template A template with a reasonable basic setup, including: black (formatting) flake8 (linting) mypy (type checking) isort (import sortin

Anton Pirogov 3 Jul 19, 2022
Basic Docker Compose template application with Flask, Celery, Redis, MySQL, SocketIO, Nginx and Gunicorn.

Nginx / Gunicorn / Flask 🐍 / Celery / SocketIO / MySQL / Redis / Docker 🐳 sample application Basic Docker Compose template application for orchestat

Alex Oarga 8 Aug 06, 2022
Template for creating PyPI project

template-for-creating-pypi-project Template for creating PyPI project Hello there! This is a template for creating a PyPI project. Fork or clone this

4 Apr 25, 2022
Cookiecutter to create a Google Function. Powered by Poetry, GitHub actions, and Google Cloud Platform

Cookiecutter Google Function Cookiecutter template for a Google Function. Powered by Poetry, and GitHub actions. Quickstart Install the latest Cookiec

Arthur 1 Jan 07, 2022
Cookiecutter-allpurpose-minimal-python - A simple cookiecutter template for general-purpose python projects.

cookiecutter-allpurpose-minimal-python A simple cookiecutter template for general-purpose python projects. To use, run pip install cookiecutter cookie

E. Tolga Ayan 2 Jan 24, 2022
NHS Theme for Streamlit applications

NHS Streamlit App Template Deployment (local) The tool has been built using Stre

nhs.pycom 3 Nov 07, 2022
Boilerplate code for a Python Flask API

MrMat :: Python :: API :: Flask Boilerplate code for a Python Flask API This variant of a Python Flask API is code-first and using native Flask Featur

0 Dec 26, 2021
Cookiecutter Flask OpenAPI is a template for jumpstarting production-ready Flask projects quickly.

Cookiecutter Flask OpenAPI is a template for jumpstarting production-ready Flask projects quickly. It has a well organized and scalable structure. It uses API design first

Roger Camargo 3 Nov 17, 2022
A project to get you started with Docker and Django.

Docker Django tl;dr $ git clone [email protected]:erroneousboat/docker-django.git $ d

JP Bruins Slot 176 Dec 29, 2022
Mad-cookiecutter - Cookiecutter templates for MaD projects

MaD Cookiecutter Templates A set of templates that can be used to quickly get st

Machine Learning and Data Analytics Lab FAU 1 Jan 10, 2022