SDK helper library
Project description
Sdklib helps you to write you own client library which will consume a specific service.
Highlights
Python 2.7+ or 3.3+.
Only http/https protocol is currently supported.
BDD integration.
Install
Install the sdklib package using pip:
pip install sdklib
Sample
Find my first SDK on github: https://github.com/ivanprjcts/my-first-sdk
from sdklib.http import HttpSdk
class FirstSdk(HttpSdk):
"""
My First Sdk.
"""
DEFAULT_HOST = "http://mockapi.sdklib.org"
API_ITEMS_URL_PATH = "/items/"
def create_item(self, name, description=None):
"""
Create an item.
:type name: str
:type description: str
:return: SdkResponse
"""
params = parse_args(name=name, description=description)
return self.post(self.API_ITEMS_URL_PATH, body_params=params)
Run tests
Running testing with coverage:
py.test --cov=sdklib tests/
Contributing
Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
Fork the repository on GitHub to start making your changes to the master branch (or branch off of it).
Write a test which shows that the bug was fixed or that the feature works as expected.
Send a pull request and bug the maintainer until it gets merged and published. Make sure to add yourself to Authors.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for sdklib-1.11.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0dd7cc4f8a5cf617cc7a54d3a246a4f65cd7527789b62a8aee0e1113ccecd8b |
|
MD5 | acf95f60bba5cd34211775f112853f90 |
|
BLAKE2b-256 | 754243e3cfcddeb4add9593ab8b438edeeaafe0d6759b01de7d8117df48bbb8e |