pylapi 0.12.16__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pylapi-0.12.16/LICENSE +21 -0
- pylapi-0.12.16/OVERVIEW.md +113 -0
- pylapi-0.12.16/PKG-INFO +137 -0
- pylapi-0.12.16/README.md +30 -0
- pylapi-0.12.16/pyproject.toml +28 -0
- pylapi-0.12.16/setup.cfg +4 -0
- pylapi-0.12.16/setup.py +45 -0
- pylapi-0.12.16/src/pylapi/__init__.py +1 -0
- pylapi-0.12.16/src/pylapi/__version__.py +8 -0
- pylapi-0.12.16/src/pylapi/autogen.py +790 -0
- pylapi-0.12.16/src/pylapi/autogen_template.py +80 -0
- pylapi-0.12.16/src/pylapi/config.py +26 -0
- pylapi-0.12.16/src/pylapi/pylapi.py +1022 -0
- pylapi-0.12.16/src/pylapi.egg-info/PKG-INFO +137 -0
- pylapi-0.12.16/src/pylapi.egg-info/SOURCES.txt +17 -0
- pylapi-0.12.16/src/pylapi.egg-info/dependency_links.txt +1 -0
- pylapi-0.12.16/src/pylapi.egg-info/entry_points.txt +2 -0
- pylapi-0.12.16/src/pylapi.egg-info/requires.txt +4 -0
- pylapi-0.12.16/src/pylapi.egg-info/top_level.txt +1 -0
pylapi-0.12.16/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Jacky Ko
|
|
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.
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# PyLapi
|
|
2
|
+
|
|
3
|
+
Python Lightweight API (PyLapi) is a Python API builder. It takes only a few seconds to automatically generate a Python API from OpenAPI specifications or less than an hour for an experienced Python developer to create a custom Python API.
|
|
4
|
+
|
|
5
|
+
You can drive PyLapi in an [automatic](https://github.com/jackyko8/pylapi/tree/main/tutorials/2.%20How%20to%20use%20a%20PyLapi%20API.ipynb), [semiautomatic](https://github.com/jackyko8/pylapi/tree/main/tutorials/5.%20PyLapi%20Generator%20Automation.ipynb), or [manual](https://github.com/jackyko8/pylapi/tree/main/tutorials/3.%20A%20ChatGPT%20Conversation%20with%20PyLapi.ipynb) way.
|
|
6
|
+
|
|
7
|
+
***Automatic***:
|
|
8
|
+
|
|
9
|
+
The auto-generated Python API contains fully functional resource classes with API methods embedded with OpenAPI specifications as user guide inline comments, so you don't need to read the lengthy OpenAPI Specification to study or use the API.
|
|
10
|
+
|
|
11
|
+
For more details, please see this [tutorial](https://github.com/jackyko8/pylapi/tree/main/tutorials/2.%20How%20to%20use%20a%20PyLapi%20API.ipynb) on how to use the generated API.
|
|
12
|
+
|
|
13
|
+
***Semiautomatic***:
|
|
14
|
+
|
|
15
|
+
You can also manually "rewrite" some of the generated classes and methods in a separate code file to, for example, specify custom parameters, pre-process the request, or post-process the response. The PyLapi generator will merge your code into the generated Python API automatically.
|
|
16
|
+
|
|
17
|
+
PyLapi's code-rewrite feature allows you to specify different API URL endpoints for individual resources, effectively combining multiple API backend services into a single frontend API. All parameters and the request body are dynamically mapped based on the API method route, with the option to rewrite them if you so choose.
|
|
18
|
+
|
|
19
|
+
More details can be found in this [tutorial](https://github.com/jackyko8/pylapi/tree/main/tutorials/5.%20PyLapi%20Generator%20Automation.ipynb).
|
|
20
|
+
|
|
21
|
+
***Manual***:
|
|
22
|
+
|
|
23
|
+
When OpenAPI Specifications are not available or you want to create a Python API your own way, you can inherit your root API class from PyLapi, which does all the heavy lifting for you, so your code would mostly be a `pass`.
|
|
24
|
+
|
|
25
|
+
If you want to manipulate the API requests and responses, only minimal coding is required. In the tutorial [A ChatGPT Conversation with PyLapi](https://github.com/jackyko8/pylapi/tree/main/tutorials/3.%20A%20ChatGPT%20Conversation%20with%20PyLapi.ipynb), a fully functional Conversation resource is completed in 38 lines, allowing you to do cool things like this:
|
|
26
|
+
|
|
27
|
+
```python
|
|
28
|
+
conversation.ask("Where is the Sydney Opera House?")
|
|
29
|
+
print(conversation.data.answers[0])
|
|
30
|
+
# Output:
|
|
31
|
+
# The Sydney Opera House is located in Sydney, Australia. Specifically, it is situated on Bennelong Point in the Sydney Harbour, close to the Sydney Harbour Bridge.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
When OpenAPI Specifications are not available or you want to create a Python API your own way, you can inherit your API class from PyLapi, which does all the heavy lifting for you, so your code would mostly be a `pass`. For example,
|
|
35
|
+
|
|
36
|
+
More details can be found in this [tutorial](https://github.com/jackyko8/pylapi/tree/main/tutorials/3.%20A%20ChatGPT%20Conversation%20with%20PyLapi.ipynb).
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## A PyLapi code example
|
|
40
|
+
|
|
41
|
+
Here is a sample of a PyLapi API:
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from pylapi import PyLapi
|
|
45
|
+
|
|
46
|
+
class MyAPI(PyLapi):
|
|
47
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
48
|
+
super().__init__(*args, **kwargs)
|
|
49
|
+
self.api_url = "https://api.example.com"
|
|
50
|
+
self.api_auth_type = "Bearer"
|
|
51
|
+
|
|
52
|
+
# resource_name="invoice", resource_base_path="invoices"
|
|
53
|
+
@MyAPI.resource_class("invoice", "invoices")
|
|
54
|
+
class InvoiceResource(MyAPI):
|
|
55
|
+
|
|
56
|
+
@MyAPI.resource_method("{invoice_number}", http_method="GET")
|
|
57
|
+
def getInvoice(self): pass
|
|
58
|
+
# To call: MyAPI.resource("invoice").getInvoice(...)
|
|
59
|
+
# Request: GET https://api.example.com/invoices/{invoice_number}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The `MyAPI` API root class inherits the decorators `@MyAPI.resource_class` and `@MyAPI.resource_methods` from `PyLapi`, which prepares the API parameters and the request body in the API request, sends the request to the API URL endpoint, processes the response, and handles the resource data for you.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
The PyLapi framework makes it very easy and natural for you to use a PyLapi-supported Python API. For example,
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
from myapi import MyAPI
|
|
69
|
+
|
|
70
|
+
MyAPI.auth(AUTH_ACCESS_TOKEN)
|
|
71
|
+
|
|
72
|
+
invoice = MyAPI.resource("invoice")
|
|
73
|
+
invoice.data = invoice.getInvoice("12345678") # using positional arguments
|
|
74
|
+
print(invoice)
|
|
75
|
+
|
|
76
|
+
item_list = invoice.getItemList()
|
|
77
|
+
product = MyAPI.resource("product")
|
|
78
|
+
invoice_total = 0.0
|
|
79
|
+
for item in item_list:
|
|
80
|
+
product.data.number = item["product_number"]
|
|
81
|
+
product.data = product.getProduct() # using implicit arguments from product.data
|
|
82
|
+
subtotal = product.data.price * item["qty"]
|
|
83
|
+
invoice_total += subtotal
|
|
84
|
+
print(f"Item: {product.data.name}")
|
|
85
|
+
print(f" Price: ${product.data.price:0.2f}")
|
|
86
|
+
print(f" Qty: {item['qty']}")
|
|
87
|
+
print(f" Subtotal: ${subtotal:0.2f}")
|
|
88
|
+
print(f"Invoice Total: ${invoice_total:0.2f}")
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Install PyLapi
|
|
92
|
+
|
|
93
|
+
Please follow these instructions to install PyLapi and its generator, replacing all variables accordingly.
|
|
94
|
+
|
|
95
|
+
To install the PyLapi class:
|
|
96
|
+
```bash
|
|
97
|
+
pip install pylapi
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
To generate a PyLapi supported Python API:
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
pylapi-autogen --template > myapi_config.py
|
|
104
|
+
# Configure myapi_config.py
|
|
105
|
+
pylapi-autogen myapi_config.py
|
|
106
|
+
# Output
|
|
107
|
+
# MyAPI generated and saved in ./myapi.py
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## More Information
|
|
111
|
+
|
|
112
|
+
PyLapi [tutorial](https://github.com/jackyko8/pylapi/blob/main/tutorials) and [user guide](https://github.com/jackyko8/pylapi/blob/main/user_guide) are available at the [PyLapi](https://github.com/jackyko8/pylapi) GitHub repository.
|
|
113
|
+
PyLapi API is documented on [Read the Docs](https://pylapi.readthedocs.io/).
|
pylapi-0.12.16/PKG-INFO
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: pylapi
|
|
3
|
+
Version: 0.12.16
|
|
4
|
+
Summary: Python Lightweight API (PyLapi)
|
|
5
|
+
Home-page: https://github.com/jackyko8/pylapi
|
|
6
|
+
Author: Jacky Ko
|
|
7
|
+
Author-email:
|
|
8
|
+
License: MIT
|
|
9
|
+
Project-URL: Changelog, https://github.com/jackyko8/pylapi/blob/main/RELEASE.md
|
|
10
|
+
Project-URL: Code, https://github.com/jackyko8/pylapi
|
|
11
|
+
Project-URL: Download, https://pypi.org/project/pylapi/
|
|
12
|
+
Project-URL: Homepage, https://www.pylapi.org/
|
|
13
|
+
Project-URL: Issue tracker, https://github.com/jackyko8/pylapi/issues
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Requires-Python: >=3.7
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: magico>=1.0
|
|
21
|
+
Requires-Dist: urllib3<1.27,>=1.21.1
|
|
22
|
+
Requires-Dist: requests>=2.5
|
|
23
|
+
Requires-Dist: PyYAML>=5.1
|
|
24
|
+
|
|
25
|
+
# PyLapi
|
|
26
|
+
|
|
27
|
+
Python Lightweight API (PyLapi) is a Python API builder. It takes only a few seconds to automatically generate a Python API from OpenAPI specifications or less than an hour for an experienced Python developer to create a custom Python API.
|
|
28
|
+
|
|
29
|
+
You can drive PyLapi in an [automatic](https://github.com/jackyko8/pylapi/tree/main/tutorials/2.%20How%20to%20use%20a%20PyLapi%20API.ipynb), [semiautomatic](https://github.com/jackyko8/pylapi/tree/main/tutorials/5.%20PyLapi%20Generator%20Automation.ipynb), or [manual](https://github.com/jackyko8/pylapi/tree/main/tutorials/3.%20A%20ChatGPT%20Conversation%20with%20PyLapi.ipynb) way.
|
|
30
|
+
|
|
31
|
+
***Automatic***:
|
|
32
|
+
|
|
33
|
+
The auto-generated Python API contains fully functional resource classes with API methods embedded with OpenAPI specifications as user guide inline comments, so you don't need to read the lengthy OpenAPI Specification to study or use the API.
|
|
34
|
+
|
|
35
|
+
For more details, please see this [tutorial](https://github.com/jackyko8/pylapi/tree/main/tutorials/2.%20How%20to%20use%20a%20PyLapi%20API.ipynb) on how to use the generated API.
|
|
36
|
+
|
|
37
|
+
***Semiautomatic***:
|
|
38
|
+
|
|
39
|
+
You can also manually "rewrite" some of the generated classes and methods in a separate code file to, for example, specify custom parameters, pre-process the request, or post-process the response. The PyLapi generator will merge your code into the generated Python API automatically.
|
|
40
|
+
|
|
41
|
+
PyLapi's code-rewrite feature allows you to specify different API URL endpoints for individual resources, effectively combining multiple API backend services into a single frontend API. All parameters and the request body are dynamically mapped based on the API method route, with the option to rewrite them if you so choose.
|
|
42
|
+
|
|
43
|
+
More details can be found in this [tutorial](https://github.com/jackyko8/pylapi/tree/main/tutorials/5.%20PyLapi%20Generator%20Automation.ipynb).
|
|
44
|
+
|
|
45
|
+
***Manual***:
|
|
46
|
+
|
|
47
|
+
When OpenAPI Specifications are not available or you want to create a Python API your own way, you can inherit your root API class from PyLapi, which does all the heavy lifting for you, so your code would mostly be a `pass`.
|
|
48
|
+
|
|
49
|
+
If you want to manipulate the API requests and responses, only minimal coding is required. In the tutorial [A ChatGPT Conversation with PyLapi](https://github.com/jackyko8/pylapi/tree/main/tutorials/3.%20A%20ChatGPT%20Conversation%20with%20PyLapi.ipynb), a fully functional Conversation resource is completed in 38 lines, allowing you to do cool things like this:
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
conversation.ask("Where is the Sydney Opera House?")
|
|
53
|
+
print(conversation.data.answers[0])
|
|
54
|
+
# Output:
|
|
55
|
+
# The Sydney Opera House is located in Sydney, Australia. Specifically, it is situated on Bennelong Point in the Sydney Harbour, close to the Sydney Harbour Bridge.
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
When OpenAPI Specifications are not available or you want to create a Python API your own way, you can inherit your API class from PyLapi, which does all the heavy lifting for you, so your code would mostly be a `pass`. For example,
|
|
59
|
+
|
|
60
|
+
More details can be found in this [tutorial](https://github.com/jackyko8/pylapi/tree/main/tutorials/3.%20A%20ChatGPT%20Conversation%20with%20PyLapi.ipynb).
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## A PyLapi code example
|
|
64
|
+
|
|
65
|
+
Here is a sample of a PyLapi API:
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
from pylapi import PyLapi
|
|
69
|
+
|
|
70
|
+
class MyAPI(PyLapi):
|
|
71
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
72
|
+
super().__init__(*args, **kwargs)
|
|
73
|
+
self.api_url = "https://api.example.com"
|
|
74
|
+
self.api_auth_type = "Bearer"
|
|
75
|
+
|
|
76
|
+
# resource_name="invoice", resource_base_path="invoices"
|
|
77
|
+
@MyAPI.resource_class("invoice", "invoices")
|
|
78
|
+
class InvoiceResource(MyAPI):
|
|
79
|
+
|
|
80
|
+
@MyAPI.resource_method("{invoice_number}", http_method="GET")
|
|
81
|
+
def getInvoice(self): pass
|
|
82
|
+
# To call: MyAPI.resource("invoice").getInvoice(...)
|
|
83
|
+
# Request: GET https://api.example.com/invoices/{invoice_number}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The `MyAPI` API root class inherits the decorators `@MyAPI.resource_class` and `@MyAPI.resource_methods` from `PyLapi`, which prepares the API parameters and the request body in the API request, sends the request to the API URL endpoint, processes the response, and handles the resource data for you.
|
|
87
|
+
|
|
88
|
+
---
|
|
89
|
+
The PyLapi framework makes it very easy and natural for you to use a PyLapi-supported Python API. For example,
|
|
90
|
+
|
|
91
|
+
```python
|
|
92
|
+
from myapi import MyAPI
|
|
93
|
+
|
|
94
|
+
MyAPI.auth(AUTH_ACCESS_TOKEN)
|
|
95
|
+
|
|
96
|
+
invoice = MyAPI.resource("invoice")
|
|
97
|
+
invoice.data = invoice.getInvoice("12345678") # using positional arguments
|
|
98
|
+
print(invoice)
|
|
99
|
+
|
|
100
|
+
item_list = invoice.getItemList()
|
|
101
|
+
product = MyAPI.resource("product")
|
|
102
|
+
invoice_total = 0.0
|
|
103
|
+
for item in item_list:
|
|
104
|
+
product.data.number = item["product_number"]
|
|
105
|
+
product.data = product.getProduct() # using implicit arguments from product.data
|
|
106
|
+
subtotal = product.data.price * item["qty"]
|
|
107
|
+
invoice_total += subtotal
|
|
108
|
+
print(f"Item: {product.data.name}")
|
|
109
|
+
print(f" Price: ${product.data.price:0.2f}")
|
|
110
|
+
print(f" Qty: {item['qty']}")
|
|
111
|
+
print(f" Subtotal: ${subtotal:0.2f}")
|
|
112
|
+
print(f"Invoice Total: ${invoice_total:0.2f}")
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Install PyLapi
|
|
116
|
+
|
|
117
|
+
Please follow these instructions to install PyLapi and its generator, replacing all variables accordingly.
|
|
118
|
+
|
|
119
|
+
To install the PyLapi class:
|
|
120
|
+
```bash
|
|
121
|
+
pip install pylapi
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
To generate a PyLapi supported Python API:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
pylapi-autogen --template > myapi_config.py
|
|
128
|
+
# Configure myapi_config.py
|
|
129
|
+
pylapi-autogen myapi_config.py
|
|
130
|
+
# Output
|
|
131
|
+
# MyAPI generated and saved in ./myapi.py
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## More Information
|
|
135
|
+
|
|
136
|
+
PyLapi [tutorial](https://github.com/jackyko8/pylapi/blob/main/tutorials) and [user guide](https://github.com/jackyko8/pylapi/blob/main/user_guide) are available at the [PyLapi](https://github.com/jackyko8/pylapi) GitHub repository.
|
|
137
|
+
PyLapi API is documented on [Read the Docs](https://pylapi.readthedocs.io/).
|
pylapi-0.12.16/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# PyLapi
|
|
2
|
+
|
|
3
|
+
Python Lightweight API (PyLapi) is a Python API builder. It takes only a few seconds to automatically generate a Python API from OpenAPI specifications or less than an hour for an experienced Python developer to create a custom Python API.
|
|
4
|
+
|
|
5
|
+
You can drive PyLapi in an [automatic](./tutorials/2.%20How%20to%20use%20a%20PyLapi%20API.ipynb), [semiautomatic](./tutorials/5.%20PyLapi%20Generator%20Automation.ipynb), or [manual](./tutorials/3.%20A%20ChatGPT%20Conversation%20with%20PyLapi.ipynb) way.
|
|
6
|
+
Here is an [overview](./OVERVIEW.md).
|
|
7
|
+
|
|
8
|
+
## Install PyLapi
|
|
9
|
+
|
|
10
|
+
Please follow these instructions to install PyLapi and its generator, replacing all variables accordingly.
|
|
11
|
+
|
|
12
|
+
To install the PyLapi class:
|
|
13
|
+
```bash
|
|
14
|
+
pip install pylapi
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
To generate a PyLapi supported Python API:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pylapi-autogen --template > myapi_config.py
|
|
21
|
+
# Configure myapi_config.py
|
|
22
|
+
pylapi-autogen myapi_config.py
|
|
23
|
+
# Output
|
|
24
|
+
# MyAPI generated and saved in ./myapi.py
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## More Information
|
|
28
|
+
|
|
29
|
+
PyLapi [tutorial](https://github.com/jackyko8/pylapi/blob/main/tutorials) and [user guide](https://github.com/jackyko8/pylapi/blob/main/user_guide) are available at the [PyLapi](https://github.com/jackyko8/pylapi) GitHub repository.
|
|
30
|
+
PyLapi API is documented on [Read the Docs](https://pylapi.readthedocs.io/).
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = [
|
|
3
|
+
"setuptools>=42",
|
|
4
|
+
"wheel"
|
|
5
|
+
]
|
|
6
|
+
build-backend = "setuptools.build_meta"
|
|
7
|
+
|
|
8
|
+
[project]
|
|
9
|
+
name = "pylapi"
|
|
10
|
+
description = "Python Lightweight API (PyLapi)"
|
|
11
|
+
readme = "OVERVIEW.md"
|
|
12
|
+
urls.Changelog = "https://github.com/jackyko8/pylapi/blob/main/RELEASE.md"
|
|
13
|
+
urls.Code = "https://github.com/jackyko8/pylapi"
|
|
14
|
+
urls.Download = "https://pypi.org/project/pylapi/"
|
|
15
|
+
urls.Homepage = "https://www.pylapi.org/"
|
|
16
|
+
urls."Issue tracker" = "https://github.com/jackyko8/pylapi/issues"
|
|
17
|
+
requires-python = ">=3.7"
|
|
18
|
+
dynamic = ["version"]
|
|
19
|
+
|
|
20
|
+
dependencies = [
|
|
21
|
+
"magico>=1.0",
|
|
22
|
+
"urllib3>=1.21.1,<1.27",
|
|
23
|
+
"requests>=2.5",
|
|
24
|
+
"PyYAML>=5.1",
|
|
25
|
+
]
|
|
26
|
+
|
|
27
|
+
[project.scripts]
|
|
28
|
+
pylapi-autogen = "pylapi.autogen:main"
|
pylapi-0.12.16/setup.cfg
ADDED
pylapi-0.12.16/setup.py
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import setuptools
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
about = {}
|
|
5
|
+
with open(f"{os.path.abspath(os.path.dirname(__file__))}/src/pylapi/__version__.py", "r") as f:
|
|
6
|
+
exec(f.read(), about)
|
|
7
|
+
|
|
8
|
+
with open("OVERVIEW.md", "r", encoding="utf-8") as f:
|
|
9
|
+
long_description = f.read()
|
|
10
|
+
|
|
11
|
+
setuptools.setup(
|
|
12
|
+
name=about["__name__"],
|
|
13
|
+
version=about["__version__"],
|
|
14
|
+
description=about["__description__"],
|
|
15
|
+
long_description=long_description,
|
|
16
|
+
long_description_content_type="text/markdown",
|
|
17
|
+
url=about["__url__"],
|
|
18
|
+
author=about["__author__"],
|
|
19
|
+
author_email=about["__author_email__"],
|
|
20
|
+
license=about["__license__"],
|
|
21
|
+
|
|
22
|
+
packages=[about["__name__"]],
|
|
23
|
+
package_data={"": ["LICENSE"]},
|
|
24
|
+
package_dir={"": "src"},
|
|
25
|
+
python_requires=">=3.7",
|
|
26
|
+
|
|
27
|
+
install_requires=[
|
|
28
|
+
"magico>=0.3.3",
|
|
29
|
+
"urllib3>=1.21.1,<1.27",
|
|
30
|
+
"requests>=2.5",
|
|
31
|
+
"PyYAML>=5.1",
|
|
32
|
+
],
|
|
33
|
+
|
|
34
|
+
project_urls={
|
|
35
|
+
"Source": about["__url__"],
|
|
36
|
+
"Documentation": about["__url__"] + "/blob/main/tutorials",
|
|
37
|
+
"Bug Tracker": about["__url__"] + "/issues",
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
classifiers=[
|
|
41
|
+
"Programming Language :: Python :: 3",
|
|
42
|
+
"License :: OSI Approved :: MIT License",
|
|
43
|
+
"Operating System :: OS Independent",
|
|
44
|
+
],
|
|
45
|
+
)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from .pylapi import *
|