[tool.poetry]
name = "openapi-python-client"
version = "0.15.1"
description = "Generate modern Python clients from OpenAPI"
repository = "https://github.com/triaxtec/openapi-python-client"
license = "MIT"
keywords=["OpenAPI", "Client", "Generator"]
authors = ["Dylan Anthony "]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Topic :: Software Development :: Code Generators",
"Typing :: Typed",
]
readme = "README.md"
packages = [
{include = "openapi_python_client"},
]
include = ["CHANGELOG.md", "openapi_python_client/py.typed"]
[tool.poetry.dependencies]
python = "^3.8"
jinja2 = "^3.0.0"
typer = ">0.6, <0.10"
colorama = {version = "^0.4.3", markers = "sys_platform == 'win32'"}
shellingham = "^1.3.2"
black = ">=23"
isort = "^5.0.5"
pydantic = "^2.1.1"
attrs = ">=21.3.0"
python-dateutil = "^2.8.1"
httpx = ">=0.20.0,<0.25.0"
autoflake = "^1.4 || ^2.0.0"
PyYAML = "^6.0"
[tool.poetry.scripts]
openapi-python-client = "openapi_python_client.cli:app"
[tool.poetry.dev-dependencies]
pytest = "*"
pytest-mock = "*"
mypy = "*"
taskipy = "*"
safety = "*"
pytest-cov = "*"
python-multipart = "*"
types-PyYAML = "^6.0.3"
types-certifi = "^2020.0.0"
types-python-dateutil = "^2.0.0"
pylint = ">=2.15.5"
[tool.taskipy.tasks]
check = """
isort .\
&& black .\
&& poetry export -f requirements.txt | poetry run safety check --bare --stdin\
&& mypy openapi_python_client\
&& pylint openapi_python_client\
&& TASKIPY=true pytest --cov openapi_python_client tests --cov-report=term-missing --basetemp=tests/tmp\
&& rm -r tests/tmp\
"""
regen = """
task regen_e2e\
&& task regen_integration\
"""
e2e = "pytest openapi_python_client end_to_end_tests/test_end_to_end.py"
re = """
task regen\
&& task e2e\
"""
regen_e2e = "python -m end_to_end_tests.regen_golden_record"
regen_integration = """
openapi-python-client update --url https://raw.githubusercontent.com/openapi-generators/openapi-test-server/main/openapi.json --config integration-tests-config.yaml\
&& mypy integration-tests --strict
"""
[tool.black]
line-length = 120
target_version = ['py38', 'py39', 'py310', 'py311']
exclude = '''
(
/(
| \.git
| \.venv
| env
| \.mypy_cache
| openapi_python_client/templates
| tests/test_templates
| end_to_end_tests/test_custom_templates
| end_to_end_tests/golden-record-custom
)/
)
'''
[tool.isort]
line_length = 120
profile = "black"
skip = [".venv", "tests/test_templates", "integration-tests", "env"]
[tool.coverage.run]
omit = ["openapi_python_client/templates/*"]
[tool.pylint.format]
max-line-length = 120
[tool.pylint.messages_control]
disable = [
# DRY < MOIST
"duplicate-code",
# Sometimes necessary to prevent cycles
"import-outside-toplevel",
# Modules are mostly used for organization here, there is no lib API
"missing-module-docstring",
# Organization is important, even when just separating classes
"too-few-public-methods",
# Disable any type-checking, that's what mypy is for
"no-member",
"no-name-in-module",
"import-error",
# False positives
"cyclic-import",
]
[tool.mypy]
plugins = ["pydantic.mypy"]
disallow_any_generics = true
disallow_untyped_defs = true
warn_redundant_casts = true
strict_equality = true
[[tool.mypy.overrides]]
module = [
"importlib_metadata",
"typer",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
junit_family = "xunit2"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"