Skip to content

Commit 7a8357f

Browse files
committed
base settings
0 parents  commit 7a8357f

24 files changed

Lines changed: 839 additions & 0 deletions

.env.sample

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# ==================APP_SETTINGS==================
2+
DEBUG=1
3+
# ==================DATA_BASE==================
4+
POSTGRES_DB=analizer
5+
POSTGRES_PASSWORD=
6+
7+
DB_ENGINE=postgresql+asyncpg
8+
DB_NAME=analizer
9+
DB_USER=postgres
10+
DB_PASSWORD=
11+
DB_HOST=db
12+
DB_PORT=5432
13+
# ==================RABBIT_MQ==================
14+
RMQ_HOST=rabbitmq
15+
RMQ_PORT=5672
16+
RABBITMQ_DEFAULT_USER=guest
17+
RABBITMQ_DEFAULT_PASS=guest

.gitignore

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
database.ini
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.nox/
44+
.coverage
45+
.coverage.*
46+
.cache
47+
nosetests.xml
48+
coverage.xml
49+
*.cover
50+
*.py,cover
51+
.hypothesis/
52+
.pytest_cache/
53+
cover/
54+
55+
# Translations
56+
*.mo
57+
*.pot
58+
59+
# Django stuff:
60+
*.log
61+
local_settings.py
62+
db.sqlite3
63+
db.sqlite3-journal
64+
.migrations
65+
media/
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
.pybuilder/
79+
target/
80+
81+
# Jupyter Notebook
82+
.ipynb_checkpoints
83+
84+
# IPython
85+
profile_default/
86+
ipython_config.py
87+
88+
# pyenv
89+
# For a library or package, you might want to ignore these files since the code is
90+
# intended to run in multiple environments; otherwise, check them in:
91+
# .python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# poetry
101+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
102+
# This is especially recommended for binary packages to ensure reproducibility, and is more
103+
# commonly ignored for libraries.
104+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
105+
poetry.lock
106+
107+
# pdm
108+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
109+
#pdm.lock
110+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
111+
# in version control.
112+
# https://pdm.fming.dev/#use-with-ide
113+
.pdm.toml
114+
115+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
116+
__pypackages__/
117+
118+
# Celery stuff
119+
celerybeat-schedule
120+
celerybeat.pid
121+
122+
# SageMath parsed files
123+
*.sage.py
124+
125+
# Environments
126+
.env
127+
.venv
128+
env/
129+
venv/
130+
ENV/
131+
env.bak/
132+
venv.bak/
133+
134+
# Spyder project settings
135+
.spyderproject
136+
.spyproject
137+
138+
# Rope project settings
139+
.ropeproject
140+
141+
# mkdocs documentation
142+
/site
143+
144+
# mypy
145+
.mypy_cache/
146+
.dmypy.json
147+
dmypy.json
148+
149+
# Pyre type checker
150+
.pyre/
151+
152+
# pytype static type analyzer
153+
.pytype/
154+
155+
# Cython debug symbols
156+
cython_debug/
157+
158+
# PyCharm
159+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
160+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
161+
# and can be added to the global gitignore or merged into this file. For a more nuclear
162+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
163+
.idea/
164+
165+
#Vscode
166+
.vscode/*
167+
!.vscode/settings.json
168+
!.vscode/tasks.json
169+
.vscode/launch.json
170+
!.vscode/extensions.json
171+
!.vscode/*.code-snippets
172+
173+
# Local History for Visual Studio Code
174+
.history/
175+
176+
# Built Visual Studio Code Extensions
177+
*.vsix
178+
*/*.ini
179+
dump.rdb
180+
.vscode
181+
test.py
182+
183+
# certs
184+
certs/

README.md

Whitespace-only changes.

alembic.ini

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# A generic, single database configuration.
2+
3+
[alembic]
4+
# path to migration scripts.
5+
# Use forward slashes (/) also on windows to provide an os agnostic path
6+
script_location = async_alembic
7+
8+
# template used to generate migration file names; The default value is %%(rev)s_%%(slug)s
9+
# Uncomment the line below if you want the files to be prepended with date and time
10+
file_template = %%(year)d_%%(month).2d_%%(day).2d_%%(hour).2d%%(minute).2d-%%(rev)s_%%(slug)s
11+
12+
# sys.path path, will be prepended to sys.path if present.
13+
# defaults to the current working directory.
14+
prepend_sys_path = .
15+
16+
# timezone to use when rendering the date within the migration file
17+
# as well as the filename.
18+
# If specified, requires the python>=3.9 or backports.zoneinfo library.
19+
# Any required deps can installed by adding `alembic[tz]` to the pip requirements
20+
# string value is passed to ZoneInfo()
21+
# leave blank for localtime
22+
# timezone =
23+
24+
# max length of characters to apply to the "slug" field
25+
# truncate_slug_length = 40
26+
27+
# set to 'true' to run the environment during
28+
# the 'revision' command, regardless of autogenerate
29+
# revision_environment = false
30+
31+
# set to 'true' to allow .pyc and .pyo files without
32+
# a source .py file to be detected as revisions in the
33+
# versions/ directory
34+
# sourceless = false
35+
36+
# version location specification; This defaults
37+
# to async_alembic/versions. When using multiple version
38+
# directories, initial revisions must be specified with --version-path.
39+
# The path separator used here should be the separator specified by "version_path_separator" below.
40+
# version_locations = %(here)s/bar:%(here)s/bat:async_alembic/versions
41+
42+
# version path separator; As mentioned above, this is the character used to split
43+
# version_locations. The default within new alembic.ini files is "os", which uses os.pathsep.
44+
# If this key is omitted entirely, it falls back to the legacy behavior of splitting on spaces and/or commas.
45+
# Valid values for version_path_separator are:
46+
#
47+
# version_path_separator = :
48+
# version_path_separator = ;
49+
# version_path_separator = space
50+
# version_path_separator = newline
51+
version_path_separator = os # Use os.pathsep. Default configuration used for new projects.
52+
53+
# set to 'true' to search source files recursively
54+
# in each "version_locations" directory
55+
# new in Alembic version 1.10
56+
# recursive_version_locations = false
57+
58+
# the output encoding used when revision files
59+
# are written from script.py.mako
60+
# output_encoding = utf-8
61+
62+
sqlalchemy.url = driver://user:pass@localhost/dbname
63+
64+
65+
[post_write_hooks]
66+
# post_write_hooks defines scripts or Python functions that are run
67+
# on newly generated revision scripts. See the documentation for further
68+
# detail and examples
69+
70+
# format using "black" - use the console_scripts runner, against the "black" entrypoint
71+
hooks = black
72+
black.type = console_scripts
73+
black.entrypoint = black
74+
black.options = -l 89 REVISION_SCRIPT_FILENAME
75+
76+
# lint with attempts to fix using "ruff" - use the exec runner, execute a binary
77+
# hooks = ruff
78+
# ruff.type = exec
79+
# ruff.executable = %(here)s/.venv/bin/ruff
80+
# ruff.options = --fix REVISION_SCRIPT_FILENAME
81+
82+
# Logging configuration
83+
[loggers]
84+
keys = root,sqlalchemy,alembic
85+
86+
[handlers]
87+
keys = console
88+
89+
[formatters]
90+
keys = generic
91+
92+
[logger_root]
93+
level = WARNING
94+
handlers = console
95+
qualname =
96+
97+
[logger_sqlalchemy]
98+
level = WARNING
99+
handlers =
100+
qualname = sqlalchemy.engine
101+
102+
[logger_alembic]
103+
level = INFO
104+
handlers =
105+
qualname = alembic
106+
107+
[handler_console]
108+
class = StreamHandler
109+
args = (sys.stderr,)
110+
level = NOTSET
111+
formatter = generic
112+
113+
[formatter_generic]
114+
format = %(levelname)-5.5s [%(name)s] %(message)s
115+
datefmt = %H:%M:%S

api_v1/__init__.py

Whitespace-only changes.

api_v1/routers.py

Whitespace-only changes.

async_alembic/README

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Generic single-database configuration with an async dbapi.

0 commit comments

Comments
 (0)