aboutsummaryrefslogtreecommitdiffhomepage
path: root/support/openapi/python
diff options
context:
space:
mode:
authorAverage Dude <loveisgrief@tuta.io>2020-02-18 14:49:11 +0100
committerRigel Kent <sendmemail@rigelk.eu>2020-02-18 14:49:11 +0100
commit170cd639a7ed591184fde23968b2d24dac630e45 (patch)
treea5221fd1a246122ff95182c9dc1d1fb115dfd483 /support/openapi/python
parent71e75ef27e8f993eaafc73896ac6f22fe91df64a (diff)
downloadPeerTube-170cd639a7ed591184fde23968b2d24dac630e45.tar.gz
PeerTube-170cd639a7ed591184fde23968b2d24dac630e45.tar.zst
PeerTube-170cd639a7ed591184fde23968b2d24dac630e45.zip
Create template dirs for openapi clients and provide README templates
The definitions are now also in the template dirs because they will be ignored by the generator. Generators only use overrides and don't do anything with new files.
Diffstat (limited to 'support/openapi/python')
-rw-r--r--support/openapi/python/README.mustache47
-rw-r--r--support/openapi/python/def.yaml5
2 files changed, 52 insertions, 0 deletions
diff --git a/support/openapi/python/README.mustache b/support/openapi/python/README.mustache
new file mode 100644
index 000000000..93dcd5ab6
--- /dev/null
+++ b/support/openapi/python/README.mustache
@@ -0,0 +1,47 @@
1# Python API client for {{appName}}
2
3This Python package is automatically generated from [PeerTube's REST API](https://docs.joinpeertube.org/api-rest-reference.html),
4using the [OpenAPI Generator](https://openapi-generator.tech) project:
5
6- API version: {{appVersion}}
7- Package version: {{packageVersion}}
8{{^hideGenerationTimestamp}}
9- Build date: {{generatedDate}}
10{{/hideGenerationTimestamp}}
11- Build package: {{generatorClass}}
12
13{{#infoUrl}}
14For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}})
15{{/infoUrl}}
16
17## Requirements.
18
19Python 2.7 and 3.4+
20
21## Installation & Usage
22
23```sh
24pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git
25```
26(you may need to run `pip` with root permission: `sudo pip install git+https://{{gitHost}}/{{{gitUserId}}}/{{{gitRepoId}}}.git`)
27
28Then import the package:
29```python
30import {{{packageName}}}
31```
32
33## Getting Started
34
35Please follow the [installation procedure](#installation--usage) and then run the following:
36
37{{> common_README }}
38
39## License
40
41Copyright (C) 2015-2020 PeerTube Contributors
42
43This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
44
45This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
46
47You should have received a copy of the GNU Affero General Public License along with this program. If not, see http://www.gnu.org/licenses.
diff --git a/support/openapi/python/def.yaml b/support/openapi/python/def.yaml
new file mode 100644
index 000000000..819a466eb
--- /dev/null
+++ b/support/openapi/python/def.yaml
@@ -0,0 +1,5 @@
1# https://openapi-generator.tech/docs/generators/python
2
3packageName: peertube
4projectName: peertube
5