Browse Source

Initial commit

tags/0.0.1b
Timur Demin 1 month ago
commit
694b6cd634
Signed by: Timur Demin <me@tdem.in> GPG Key ID: 9EDF3F9D9286FA20
7 changed files with 299 additions and 0 deletions
  1. 130
    0
      .gitignore
  2. 110
    0
      .pylintrc
  3. 21
    0
      LICENSE.txt
  4. 4
    0
      project_amber/__init__.py
  5. 7
    0
      project_amber/app.py
  6. 2
    0
      setup.cfg
  7. 25
    0
      setup.py

+ 130
- 0
.gitignore View File

@@ -0,0 +1,130 @@
1
+# Taken from https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore
2
+# Many thanks to the people who wrote this!
3
+
4
+# VSCode settings
5
+.vscode
6
+
7
+# Byte-compiled / optimized / DLL files
8
+__pycache__/
9
+*.py[cod]
10
+*$py.class
11
+
12
+# C extensions
13
+*.so
14
+
15
+# Distribution / packaging
16
+.Python
17
+build/
18
+develop-eggs/
19
+dist/
20
+downloads/
21
+eggs/
22
+.eggs/
23
+lib/
24
+lib64/
25
+parts/
26
+sdist/
27
+var/
28
+wheels/
29
+pip-wheel-metadata/
30
+share/python-wheels/
31
+*.egg-info/
32
+.installed.cfg
33
+*.egg
34
+MANIFEST
35
+
36
+# PyInstaller
37
+#  Usually these files are written by a python script from a template
38
+#  before PyInstaller builds the exe, so as to inject date/other infos into it.
39
+*.manifest
40
+*.spec
41
+
42
+# Installer logs
43
+pip-log.txt
44
+pip-delete-this-directory.txt
45
+
46
+# Unit test / coverage reports
47
+htmlcov/
48
+.tox/
49
+.nox/
50
+.coverage
51
+.coverage.*
52
+.cache
53
+nosetests.xml
54
+coverage.xml
55
+*.cover
56
+.hypothesis/
57
+.pytest_cache/
58
+
59
+# Translations
60
+*.mo
61
+*.pot
62
+
63
+# Django stuff:
64
+*.log
65
+local_settings.py
66
+db.sqlite3
67
+db.sqlite3-journal
68
+
69
+# Flask stuff:
70
+instance/
71
+.webassets-cache
72
+
73
+# Scrapy stuff:
74
+.scrapy
75
+
76
+# Sphinx documentation
77
+docs/_build/
78
+
79
+# PyBuilder
80
+target/
81
+
82
+# Jupyter Notebook
83
+.ipynb_checkpoints
84
+
85
+# IPython
86
+profile_default/
87
+ipython_config.py
88
+
89
+# pyenv
90
+.python-version
91
+
92
+# pipenv
93
+#   According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
94
+#   However, in case of collaboration, if having platform-specific dependencies or dependencies
95
+#   having no cross-platform support, pipenv may install dependencies that don't work, or not
96
+#   install all needed dependencies.
97
+#Pipfile.lock
98
+
99
+# celery beat schedule file
100
+celerybeat-schedule
101
+
102
+# SageMath parsed files
103
+*.sage.py
104
+
105
+# Environments
106
+.env
107
+.venv
108
+env/
109
+venv/
110
+ENV/
111
+env.bak/
112
+venv.bak/
113
+
114
+# Spyder project settings
115
+.spyderproject
116
+.spyproject
117
+
118
+# Rope project settings
119
+.ropeproject
120
+
121
+# mkdocs documentation
122
+/site
123
+
124
+# mypy
125
+.mypy_cache/
126
+.dmypy.json
127
+dmypy.json
128
+
129
+# Pyre type checker
130
+.pyre/

+ 110
- 0
.pylintrc View File

@@ -0,0 +1,110 @@
1
+[MASTER]
2
+persistent=no
3
+load-plugins=
4
+jobs=1
5
+unsafe-load-any-extension=no
6
+extension-pkg-whitelist=
7
+
8
+[MESSAGES CONTROL]
9
+# Only show warnings with the listed confidence levels. Leave empty to show
10
+# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED
11
+confidence=
12
+disable=
13
+    attribute-defined-outside-init,
14
+    duplicate-code,
15
+    fixme,
16
+    invalid-name,
17
+    missing-docstring,
18
+    protected-access,
19
+    too-few-public-methods,
20
+    # handled by black
21
+    format
22
+
23
+[REPORTS]
24
+output-format=colorized
25
+files-output=no
26
+reports=no
27
+evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10)
28
+
29
+[LOGGING]
30
+logging-modules=logging
31
+
32
+[MISCELLANEOUS]
33
+notes=FIXME,XXX,TODO
34
+
35
+[SIMILARITIES]
36
+min-similarity-lines=4
37
+ignore-comments=yes
38
+ignore-docstrings=yes
39
+ignore-imports=no
40
+
41
+[VARIABLES]
42
+init-import=no
43
+dummy-variables-rgx=_$|dummy
44
+additional-builtins=
45
+callbacks=cb_,_cb
46
+
47
+[FORMAT]
48
+max-line-length=100
49
+ignore-long-lines=^\s*(# )?<?https?://\S+>?$
50
+single-line-if-stmt=no
51
+no-space-check=trailing-comma,dict-separator
52
+max-module-lines=2000
53
+indent-string='    '
54
+indent-after-paren=4
55
+expected-line-ending-format=
56
+
57
+[BASIC]
58
+bad-functions=map,filter,input
59
+good-names=i,j,k,ex,Run,_
60
+bad-names=foo,bar,baz,toto,tutu,tata
61
+name-group=
62
+include-naming-hint=yes
63
+function-rgx=[a-z_][a-z0-9_]{2,30}$
64
+function-name-hint=[a-z_][a-z0-9_]{2,30}$
65
+variable-rgx=[a-z_][a-z0-9_]{2,30}$
66
+variable-name-hint=[a-z_][a-z0-9_]{2,30}$
67
+const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
68
+const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
69
+attr-rgx=[a-z_][a-z0-9_]{2,}$
70
+attr-name-hint=[a-z_][a-z0-9_]{2,}$
71
+argument-rgx=[a-z_][a-z0-9_]{2,30}$
72
+argument-name-hint=[a-z_][a-z0-9_]{2,30}$
73
+class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
74
+class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
75
+inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
76
+inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
77
+class-rgx=[A-Z_][a-zA-Z0-9]+$
78
+class-name-hint=[A-Z_][a-zA-Z0-9]+$
79
+module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
80
+module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
81
+method-rgx=[a-z_][a-z0-9_]{2,}$
82
+method-name-hint=[a-z_][a-z0-9_]{2,}$
83
+no-docstring-rgx=__.*__
84
+docstring-min-length=-1
85
+property-classes=abc.abstractproperty
86
+
87
+[TYPECHECK]
88
+ignore-mixin-members=yes
89
+ignored-modules=
90
+ignored-classes=SQLObject, optparse.Values, thread._local, _thread._local
91
+generated-members=REQUEST,acl_users,aq_parent
92
+contextmanager-decorators=contextlib.contextmanager
93
+
94
+[DESIGN]
95
+max-args=8
96
+ignored-argument-names=_.*
97
+max-locals=25
98
+max-returns=11
99
+max-branches=26
100
+max-statements=100
101
+max-parents=7
102
+max-attributes=11
103
+min-public-methods=2
104
+max-public-methods=25
105
+
106
+[CLASSES]
107
+defining-attr-methods=__init__,__new__,setUp
108
+valid-classmethod-first-arg=cls
109
+valid-metaclass-classmethod-first-arg=mcs
110
+exclude-protected=_asdict,_fields,_replace,_source,_make

+ 21
- 0
LICENSE.txt View File

@@ -0,0 +1,21 @@
1
+MIT License
2
+
3
+Copyright (c) 2019 Timur Demin
4
+
5
+Permission is hereby granted, free of charge, to any person obtaining a copy
6
+of this software and associated documentation files (the "Software"), to deal
7
+in the Software without restriction, including without limitation the rights
8
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+copies of the Software, and to permit persons to whom the Software is
10
+furnished to do so, subject to the following conditions:
11
+
12
+The above copyright notice and this permission notice shall be included in all
13
+copies or substantial portions of the Software.
14
+
15
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+SOFTWARE.

+ 4
- 0
project_amber/__init__.py View File

@@ -0,0 +1,4 @@
1
+from project_amber.app import app
2
+
3
+if __name__ == "__main__":
4
+    app.run()

+ 7
- 0
project_amber/app.py View File

@@ -0,0 +1,7 @@
1
+from flask import Flask
2
+
3
+app = Flask(__name__)
4
+
5
+@app.route("/")
6
+def hello():
7
+    return "works"

+ 2
- 0
setup.cfg View File

@@ -0,0 +1,2 @@
1
+[metadata]
2
+license_files = LICENSE.txt

+ 25
- 0
setup.py View File

@@ -0,0 +1,25 @@
1
+#!/usr/bin/env python3
2
+
3
+from setuptools import setup
4
+
5
+setup(
6
+    name="project_amber",
7
+    version="0.0.1",
8
+    description="The backend app of a note-taking app, Project Amber",
9
+    url="https://git.tdem.in/amber/backend",
10
+    author="Timur Demin",
11
+    author_email="me@tdem.in",
12
+    license="MIT",
13
+    classifiers=[
14
+        "Development Status :: 3 - Alpha",
15
+        "License :: OSI Approved :: MIT License",
16
+        "Programming Language :: Python :: 3.6",
17
+        "Programming Language :: Python :: 3.7",
18
+        "Programming Language :: Python :: 3"
19
+    ],
20
+    keywords="notes backend flask",
21
+    # project_urls={}
22
+    packages=["project_amber"],
23
+    install_requires=["flask"],
24
+    python_requires=">=3.6"
25
+)

Loading…
Cancel
Save