Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
lilpuzeen committed Mar 7, 2024
0 parents commit ece138c
Show file tree
Hide file tree
Showing 17 changed files with 183 additions and 0 deletions.
Empty file added .flake8
Empty file.
Empty file added .github/workflows/linters.yml
Empty file.
139 changes: 139 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# IPython
profile_default/
ipython_config.py

# pyenv
.python-version

# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock

# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/

# Celery stuff
celerybeat-schedule
celerybeat.pid

# SageMath parsed files
*.sage.py

# Environments
.env
.env.prefect
.venv
env/
venv/
ENV/
env.bak/
venv.bak/

# Spyder project settings
.spyderproject
.spyproject

# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/
.dmypy.json
dmypy.json

# Pyre type checker
.pyre/
postgres-data*
node_modules/
.DS_Store

# PyCharm
.idea/
backup.dump
backup.dump.gz
.vscode
Empty file added Dockerfile
Empty file.
Empty file added README.md
Empty file.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
Empty file added docker-compose.yml
Empty file.
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{%
include-markdown "../README.md"
heading-offset=0
%}
17 changes: 17 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[project]
name = "VoteSystem"
authors = [
{name = "Arman Tovmasian", email = "[email protected]"},
]
description = "Poll's voting system"
readme = "README.md"
requires-python = ">=3.10"
dependencies = []
dynamic = ["version"]

[project.optional-dependencies]
test = []
docs = []

[tool.setuptools.dynamic]
version = {file = "VERSION"}
Empty file added requirements/base.txt
Empty file.
Empty file added requirements/dev.txt
Empty file.
Empty file added requirements/prod.txt
Empty file.
Empty file added src/config.py
Empty file.
Empty file added src/database.py
Empty file.
13 changes: 13 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
from fastapi import FastAPI

app = FastAPI()


@app.get("/")
async def root():
return {"message": "Hello World"}


@app.get("/hello/{name}")
async def say_hello(name: str):
return {"message": f"Hello {name}"}
Empty file added src/models.py
Empty file.
9 changes: 9 additions & 0 deletions tests/test_main.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
GET http://127.0.0.1:8000/
Accept: application/json

###

GET http://127.0.0.1:8000/hello/User
Accept: application/json

###

0 comments on commit ece138c

Please sign in to comment.