Skip to content

Commit 826462c

Browse files
committed
Initial commit
0 parents  commit 826462c

File tree

22 files changed

+1255
-0
lines changed

22 files changed

+1255
-0
lines changed

.flake8

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[flake8]
2+
ignore = E203, E266, E501, W503, F403, F401
3+
max-line-length = 89
4+
max-complexity = 18
5+
select = B,C,E,F,W,T4,B9

.github/workflows/pylint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Pylint
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Set up Python 3.8
13+
uses: actions/setup-python@v1
14+
with:
15+
python-version: 3.8
16+
- name: Install dependencies
17+
run: |
18+
python -m pip install --upgrade pip
19+
pip install pylint
20+
- name: Test with pytest
21+
run: |
22+
pylint `ls -R|grep .py$|xargs`

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.idea
2+
.vscode
3+
__pycache__
4+
*/__pycache__
5+
*/*/__pycache__
6+
*/*/*/__pycache__
7+
*/*/*/*/__pycache__

.isort.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[settings]
2+
line_length = 88
3+
multi_line_output = 3
4+
include_trailing_comma = True
5+
known_third_party = cryptography,flask,sqlalchemy

.pre-commit-config.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
repos:
2+
- repo: https://github.com/asottile/seed-isort-config
3+
rev: v1.9.3
4+
hooks:
5+
- id: seed-isort-config
6+
- repo: https://github.com/pre-commit/mirrors-isort
7+
rev: v4.3.21
8+
hooks:
9+
- id: isort
10+
- repo: https://github.com/ambv/black
11+
rev: stable
12+
hooks:
13+
- id: black
14+
language_version: python3.8
15+
- repo: https://github.com/pre-commit/pre-commit-hooks
16+
rev: v2.3.0
17+
hooks:
18+
- id: flake8

README.rst

Whitespace-only changes.

app.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from flask import Flask
2+
3+
from ssh_manager_backend.app.models.user import UserModel
4+
from ssh_manager_backend.db.database import db_session
5+
6+
# app = Flask(__name__)
7+
#
8+
#
9+
# @app.teardown_appcontext
10+
# def shutdown_session() -> None:
11+
# """
12+
# Shuts down database session on application close
13+
# :return: None
14+
# """
15+
#
16+
# db_session.remove()
17+
#
18+
19+
a = UserModel()
20+
# print(a.create('abcd', 'abcd', 'abcd', True, b'123d', b'123d', b'123d', b'123d', b'123d', b'123d'))
21+
print(a.get_user("abc"))

0 commit comments

Comments
 (0)