Skip to content

DuckyMomo20012/python-template

Repository files navigation

Python Template

A simple Python template

contributors last update forks stars open issues license


📔 Table of Contents

🌟 About the Project

📷 Screenshots

screenshot

👾 Tech Stack

Client
Server
Database
DevOps

🎯 Features

  • Feature 1.
  • Feature 2.
  • Feature 3.

🎨 Color Reference

Color Hex
Primary Color #222831 #222831
Secondary Color #393E46 #393E46
Accent Color #00ADB5 #00ADB5
Text Color #EEEEEE #EEEEEE

🔑 Environment Variables

To run this project, you will need to add the following environment variables to your .env file:

  • App configs:

    TEST_VAR: Description of this environment variable.

E.g:

# .env
TEST_VAR="my secret key"

You can also check out the file .env.example to see all required environment variables.

🧰 Getting Started

‼️ Prerequisites

  • Python: >= 3.11.

  • This project uses Poetry as package manager:

    Linux, macOS, Windows (WSL)

    curl -sSL https://install.python-poetry.org | python3 -

    Read more about installation on Poetry documentation.

🏃 Run Locally

Clone the project:

git clone https://github.com/DuckyMomo20012/python-template.git

Go to the project directory:

cd python-template

Install dependencies:

poetry install

pre-commit install

OR:

Install dependencies with pip:

pip install -r requirements.txt

pre-commit install
Export dependencies from pyproject.toml

Export Poetry dependencies to file requirements.txt:

poetry export -f requirements.txt --output requirements.txt

Note: You can add option: --dev to include development dependencies.


Activate the virtual environment:

poetry shell

Start the program:

poe dev

🧪 Running Tests

To run tests, run the following command:

poe test

🚩 Deployment

To deploy this project run:

poe deploy

👀 Usage

Use this space to tell a little more about your project and how it can be used. Show additional screenshots, code samples, demos, or links to other resources.

from environs import Env

env = Env()
# Read .env into os.environ
env.read_env()

print("Hello World")

TEST_VAR = env.str("TEST_VAR")

print(f"My secret key: {TEST_VAR}")

🧭 Roadmap

  • Todo 1.
  • Todo 2.

👋 Contributing

Contributions are always welcome!

📜 Code of Conduct

Please read the Code of Conduct.

❔ FAQ

  • Question 1

    • Answer 1.
  • Question 2

    • Answer 2.

⚠️ License

Distributed under MIT license. See LICENSE for more information.

🤝 Contact

Duong Vinh - @duckymomo20012 - tienvinh.duong4@gmail.com

Project Link: https://github.com/DuckyMomo20012/python-template.

💎 Acknowledgements

Here are useful resources and libraries that we have used in our projects:

About

My Python template

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages