Skip to content

Commit 35a6006

Browse files
committed
initial commit
0 parents  commit 35a6006

File tree

6 files changed

+190
-0
lines changed

6 files changed

+190
-0
lines changed

.gitignore

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.idea/
2+
env/
3+
venv/
4+
.venv/
5+
env3*/
6+
Pipfile
7+
*.lock
8+
*.py[cod]
9+
*.egg-info/
10+
/build/
11+
dist/
12+
.cache/
13+
.mypy_cache/
14+
test.py
15+
.coverage
16+
.hypothesis
17+
/htmlcov/
18+
/site/
19+
/site.zip
20+
.pytest_cache/
21+
.vscode/
22+
_build/
23+
.auto-format
24+
/sandbox/
25+
/.ghtopdep_cache/
26+
/worktrees/

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2022 Samuel Colvin and other contributors
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.

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# pydantic-settings
2+
3+
**Work in Progress**, see https://github.com/pydantic/pydantic/pull/4492

pydantic_settings/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import warnings
2+
from .version import VERSION
3+
4+
__version__ = VERSION
5+
warnings.warn(
6+
'This is a placeholder until pydantic-settings is released, '
7+
'see https://github.com/pydantic/pydantic/pull/4492'
8+
)

pydantic_settings/version.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VERSION = '0.0.1'

pyproject.toml

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
[build-system]
2+
requires = ['hatchling']
3+
build-backend = 'hatchling.build'
4+
5+
[tool.hatch.version]
6+
path = 'pydantic_settings/version.py'
7+
8+
[project]
9+
name = 'pydantic-settings'
10+
description = 'Settings management using Pydantic'
11+
authors = [
12+
{name = 'Samuel Colvin', email = '[email protected]'},
13+
{name = 'Eric Jolibois', email = '[email protected]'},
14+
{name = 'Hasan Ramezani', email = '[email protected]'},
15+
]
16+
license = {file = 'LICENSE'}
17+
readme = 'README.md'
18+
classifiers = [
19+
'Development Status :: 5 - Production/Stable',
20+
'Programming Language :: Python',
21+
'Programming Language :: Python :: 3',
22+
'Programming Language :: Python :: 3 :: Only',
23+
'Programming Language :: Python :: 3.7',
24+
'Programming Language :: Python :: 3.8',
25+
'Programming Language :: Python :: 3.9',
26+
'Programming Language :: Python :: 3.10',
27+
'Programming Language :: Python :: 3.11',
28+
'Intended Audience :: Developers',
29+
'Intended Audience :: Information Technology',
30+
'Intended Audience :: System Administrators',
31+
'License :: OSI Approved :: MIT License',
32+
'Operating System :: Unix',
33+
'Operating System :: POSIX :: Linux',
34+
'Environment :: Console',
35+
'Environment :: MacOS X',
36+
'Topic :: Software Development :: Libraries :: Python Modules',
37+
'Topic :: Internet',
38+
]
39+
requires-python = '>=3.7'
40+
dependencies = [
41+
# 'pydantic>=2.0.0',
42+
'python-dotenv>=0.10.4',
43+
]
44+
dynamic = ['version']
45+
46+
[project.urls]
47+
Homepage = 'https://github.com/pydantic/pydantic-settings'
48+
#Documentation = 'https://pydantic-docs.helpmanual.io'
49+
Funding = 'https://github.com/sponsors/samuelcolvin'
50+
Source = 'https://github.com/pydantic/pydantic-settings'
51+
#Changelog = 'https://pydantic-docs.helpmanual.io/changelog'
52+
53+
[tool.pytest.ini_options]
54+
testpaths = 'tests'
55+
filterwarnings = [
56+
'error',
57+
]
58+
59+
[tool.flake8]
60+
max_line_length = 120
61+
max_complexity = 14
62+
inline_quotes = 'single'
63+
multiline_quotes = 'double'
64+
ignore = ['E203', 'W503']
65+
66+
[tool.coverage.run]
67+
source = ['pydantic_settings']
68+
branch = true
69+
context = '${CONTEXT}'
70+
71+
[tool.coverage.report]
72+
precision = 2
73+
exclude_lines = [
74+
'pragma: no cover',
75+
'raise NotImplementedError',
76+
'raise NotImplemented',
77+
'if TYPE_CHECKING:',
78+
'@overload',
79+
]
80+
81+
82+
[tool.coverage.paths]
83+
source = [
84+
'pydantic_settings/',
85+
]
86+
87+
[tool.black]
88+
color = true
89+
line-length = 120
90+
target-version = ['py310']
91+
skip-string-normalization = true
92+
93+
[tool.isort]
94+
line_length = 120
95+
known_first_party = 'pydantic_settings'
96+
known_third_party = 'pydantic'
97+
multi_line_output = 3
98+
include_trailing_comma = true
99+
force_grid_wrap = 0
100+
combine_as_imports = true
101+
102+
[tool.mypy]
103+
python_version = '3.10'
104+
show_error_codes = true
105+
follow_imports = 'silent'
106+
strict_optional = true
107+
warn_redundant_casts = true
108+
warn_unused_ignores = true
109+
disallow_any_generics = true
110+
check_untyped_defs = true
111+
no_implicit_reexport = true
112+
warn_unused_configs = true
113+
disallow_subclassing_any = true
114+
disallow_incomplete_defs = true
115+
disallow_untyped_decorators = true
116+
disallow_untyped_calls = true
117+
118+
# for strict mypy: (this is the tricky one :-))
119+
disallow_untyped_defs = true
120+
121+
# remaining arguments from `mypy --strict` which cause errors
122+
# no_implicit_optional = true
123+
# warn_return_any = true
124+
125+
# ansi2html and devtools are required to avoid the need to install these packages when running linting,
126+
# they're used in the docs build script
127+
[[tool.mypy.overrides]]
128+
module = [
129+
'dotenv.*',
130+
]
131+
ignore_missing_imports = true

0 commit comments

Comments
 (0)