Skip to content

Commit b6d1fc9

Browse files
committed
init
1 parent e2bd8e3 commit b6d1fc9

File tree

4 files changed

+82
-0
lines changed

4 files changed

+82
-0
lines changed

Makefile

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
install:
2+
pip install -e .
3+
4+
test:
5+
py.test tests -vv
6+
7+
doc:
8+
cd docs && make html
9+
10+
clean:
11+
rm -rf build/ dist/ *.egg-info .pytest_cache
12+
find . -name '*.pyc' -type f -exec rm -rf {} +
13+
find . -name '__pycache__' -exec rm -rf {} +
14+
15+
package: clean
16+
python3 setup.py sdist bdist_wheel
17+
18+
publish: package
19+
twine upload dist/*
20+
21+
style:
22+
# stop the build if there are Python syntax errors or undefined names
23+
flake8 spectree --count --select=E9,F63,F7,F82 --show-source --statistics
24+
# exit-zero treats all errors as warnings
25+
flake8 spectree --count --exit-zero --statistics
26+
27+
.PHONY: test doc

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Spectree
2+
3+
Yet another library to generate OpenAPI document and validate request & response with Python annotations.
4+
5+
## Features
6+
7+
* Less boilerplate code, annotations are really easy-to-use :sparkles:
8+
* Generate API document with [Redoc UI](https://github.com/Redocly/redoc) or [Swagger UI](https://github.com/swagger-api/swagger-ui) :yum:
9+
* Validate query, JSON data, response data with [pydantic](https://github.com/samuelcolvin/pydantic/) :wink:
10+
11+
## Quick Start
12+
13+
install with pip: `pip install spectree`
14+
15+
### Demo
16+
17+
```py
18+
```

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
pydantic>=1.2

setup.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
from setuptools import setup, find_packages
2+
from os import path
3+
from io import open
4+
5+
6+
here = path.abspath(path.dirname(__file__))
7+
8+
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
9+
readme = f.read()
10+
11+
with open(path.join(here, 'requirements.txt'), encoding='utf-8') as f:
12+
requires = [req.strip() for req in f if req]
13+
14+
15+
setup(
16+
name='',
17+
version='0.0.1',
18+
author='Keming Yang',
19+
author_email='[email protected]',
20+
description='',
21+
long_description=readme,
22+
long_description_content_type='text/markdown',
23+
url='https://github.com/0b01001001/spectree',
24+
packages=find_packages(exclude=['examples*', 'tests*']),
25+
package_data={
26+
},
27+
classifiers=[
28+
'Programming Language :: Python :: 3',
29+
],
30+
install_requires=requires,
31+
zip_safe=False,
32+
extras_require={},
33+
entry_points={
34+
'console_scripts': [],
35+
},
36+
)

0 commit comments

Comments
 (0)