-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from rodneyosodo/NOISSUE-updatesdk
NOISSUE - Update SDK
- Loading branch information
Showing
44 changed files
with
1,955 additions
and
1,036 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# This workflows will upload a Python Package using Twine when a release is created | ||
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries | ||
|
||
on: | ||
release: | ||
types: [created, published] | ||
|
||
push: | ||
tags: | ||
- v* | ||
|
||
name: Upload Python Package to PYPI | ||
|
||
jobs: | ||
deploy: | ||
name: Publish python packages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install setuptools wheel twine | ||
- name: Build and publish | ||
env: | ||
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | ||
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | ||
run: | | ||
python setup.py sdist bdist_wheel | ||
twine upload dist/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
<!-- markdownlint-disable --> | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
# <kbd>module</kbd> `boostrap` | ||
|
||
|
||
|
||
|
||
|
||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L8"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
## <kbd>class</kbd> `Bootstrap` | ||
|
||
|
||
|
||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L14"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `__init__` | ||
|
||
```python | ||
__init__(url: str) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L17"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `add` | ||
|
||
```python | ||
add(config: dict, token: str) | ||
``` | ||
|
||
Adds new config to the list of config owned by user identified using the provided access token. | ||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L130"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `bootstrap` | ||
|
||
```python | ||
bootstrap(external_id: str, external_key: str) | ||
``` | ||
|
||
Retrieves a configuration with given external ID and external key. | ||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L114"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `remove` | ||
|
||
```python | ||
remove(config_id: str, token: str) | ||
``` | ||
|
||
Removes a Config. In case of successful removal the service will ensure that the removed config is disconnected from all the Mainflux channels. | ||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L72"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `update` | ||
|
||
```python | ||
update(config: dict, token: str) | ||
``` | ||
|
||
Update is performed by replacing the current resource data with values provided in a request payload. Note that the owner, ID, external ID, external key, Mainflux Thing ID and key cannot be changed. | ||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L93"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `update_certs` | ||
|
||
```python | ||
update_certs( | ||
config_id: str, | ||
client_cert: str, | ||
client_key: str, | ||
ca: str, | ||
token: str | ||
) | ||
``` | ||
|
||
Update is performed by replacing the current certificate data with values provided in a request payload. | ||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L56"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `view` | ||
|
||
```python | ||
view(config_id: str, token: str) | ||
``` | ||
|
||
Retrieves a configuration with given config id | ||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/boostrap.py#L36"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `whitelist` | ||
|
||
```python | ||
whitelist(config: dict, token: str) | ||
``` | ||
|
||
Updating state represents enabling/disabling Config, i.e.connecting and disconnecting corresponding Mainflux Thing to the list of Channels. | ||
|
||
|
||
|
||
|
||
--- | ||
|
||
_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
<!-- markdownlint-disable --> | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/certs.py#L0"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
# <kbd>module</kbd> `certs` | ||
|
||
|
||
|
||
|
||
|
||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/certs.py#L8"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
## <kbd>class</kbd> `Certs` | ||
|
||
|
||
|
||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/certs.py#L11"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `__init__` | ||
|
||
```python | ||
__init__(url: str) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/certs.py#L14"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `issue` | ||
|
||
```python | ||
issue(thing_id: str, key_bits: int, key_type: str, valid: str, token: str) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/certs.py#L55"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `revoke` | ||
|
||
```python | ||
revoke(thing_id: str, token: str) | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
--- | ||
|
||
<a href="https://github.com/mainflux/sdk-py/blob/main/mainflux/certs.py#L41"><img align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square"></a> | ||
|
||
### <kbd>method</kbd> `view` | ||
|
||
```python | ||
view(thing_id: str, token: str) | ||
``` | ||
|
||
Generates an access token when provided with proper credentials. | ||
|
||
|
||
|
||
|
||
--- | ||
|
||
_This file was automatically generated via [lazydocs](https://github.com/ml-tooling/lazydocs)._ |
Oops, something went wrong.