An open API service indexing awesome lists of open source software.

https://github.com/stanleygomes/c3po

Excuse me, sir. I'm a python boilerplate.
https://github.com/stanleygomes/c3po

boilerplate flask python

Last synced: about 1 month ago
JSON representation

Excuse me, sir. I'm a python boilerplate.

Awesome Lists containing this project

README

          

[![CodeFactor](https://www.codefactor.io/repository/github/stanleygomes/c3py/badge)](https://www.codefactor.io/repository/github/stanleygomes/c3py)

# C3PY

Excuse me, sir. I'm a python boilerplate.

The main goal of **C3PY** is to set patterns to be easily implemented on Python projects. We want to make easy to quick start a Python enviroment with the basic resources every project could have. Check out the patterns we defined this document bellow.

*It was inspired by [Nodevader](https://github.com/stanleygomes/nodevader)*.





Icon by Filipe Carvalho

## Startup

Step by step to get this up and running

### Clone repo and go to project folder

```
git clone https://github.com/c3py/c3py.git && cd c3py
```

### Install dependencies

```bash
pip3 install -r requirements.txt

```

### Get enviroment variables

```
cp .env.template .env
```

### Start server

```bash
python3 src/app.py
```

Via docker-compose (start database, run migrations and start server)

```bash
docker-compose up --build
```

Now you're ready to go. Open your browser: `http://localhost:8000`

## Extra [recommended] steps

Make sure you have installed:

- [PyLint](https://pypi.org/project/pylint) to help you with some syntax errors
- [autopep8](https://pypi.org/project/autopep8/0.8) to beautify your code

## Git flow

To file a new a feature

- create a branch from `master` branch. Use the pattern: `feature/description`
- file a pull request on `master` branch
- since your PR is aproved, it will be merged to `master` branch
- in a moment in time we'll create a release, using the pattern: `release/vX.X.X`

## Patterns

These are some of patterns definitions to help us to keep a default arquitecture.

- Recommended editor: [VS Code](https://code.visualstudio.com), use [Python extension](https://marketplace.visualstudio.com/items?itemName=ms-python.python) by Microsoft
- Package manager: [PyPI](https://pypi.org/), sure
- Python version: [v3.8.x](https://www.python.org/downloads)
- Python Framework: [Flask](https://palletsprojects.com/p/flask/) framework
- Python server:
- Linter: [PyLint](https://pypi.org/project/pylint)
- Formater: [autopep8](https://pypi.org/project/autopep8/0.8)
- Database:
- Migrations: Run on a container described in docker-compose file: [image](https://hub.docker.com) image
- i18n:
- Date and time:
- Test:
- Logs:
- Http Request:
- Authentication:
- SMTP email:
- XLS sheets:
- Docker compose and dockerfile attached running migrations e starting database and python server

## Project structure

Basic folder structure

## pending definition

- **src/api**: Endpoints and business logic
- **src/static**: Images, styles, fonts and other files that can be served
- **src/routes**: Routes, :]
- **src/templates**: mustache interpreted files
- **src/test**: Unity tests
- **src/utils**: App config, constants, configuration and i18n, utilities and modules superior layer implementations