Coder Social home page Coder Social logo

aiohttp-template's Introduction

Aiohttp Template

Aiohttp Application template with static files

Python Aiohttp

Installing

https://github.com/DavidRomanovizc/aiohttp-template.git
pip install -r requirements.txt
python app.py

Project Structure

📦app
 ┣ 📂database
 ┃ ┣ 📜accessor.py
 ┃ ┣ 📜database.py
 ┃ ┗ 📜__init__.py
 ┣ 📂middlewares
 ┣ 📂views
 ┃ ┣ 📜frontend.py
 ┃ ┗ 📜__init__.py
 ┣ 📜routes.py
 ┣ 📜server.py
 ┣ 📜settings.py
 ┣ 📜utils.py
 ┗ 📜__init__.py
📦config
 ┗ 📜config.yaml
📦templates
 ┗ 📂client
 ┃ ┣ 📂css
 ┃ ┃ ┗ 📜style.css
 ┃ ┣ 📂font
 ┃ ┣ 📂js
 ┃ ┃ ┗ 📜index.js
 ┃ ┗ 📜index.html
📦tests
 ┣ 📜conftest.py
 ┗ 📜__init__.py
📜app.py
📜requirements.txt

Database

📦database
 ┣ 📜accessor.py
 ┣ 📜database.py
 ┗ 📜__init__.py

Accessor.py - the file in which the code for connecting to the database is located
database.py - our table

To connect to the database, you need to go to the config folder, select the config.yaml file and change the connection url

database_url: postgres://forum_user:forum_password@localhost/forum

Variable Type Example
forum_user Database User userpg
forum_password Database Password 123456
forum Database name postgres

aiohttp-template's People

Contributors

davidromanovizc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.