SDK for use with Cloaken url unshortener AMI
Project description
Cloaken SDK
Python SDK for cloaken
resources.py contains the enpoints to use to interact with Cloaken
Examples:
from cloakensdk.client import SyncClient
from cloakensdk.resources import Url
import os
server = os.environ["SERVER_URL"]
username = os.environ["USERNAME"]
password = os.environ["PASSWORD"]
client = SyncClient(server_url=server,
username=username,
password=password)
resource = Url(client)
#unshorten a url
#todo(aj)
#create a url entry manually in the database
resource.create(url="http://test.com",unshortened_url="http://long.com")
data = resource.full_request()
See ./tests/unittests.py
Unit test instructions:
- set environment variables:
a. SERVER_URL = http://servername:port/
b. USERNAME
c. PASSWORD - python tests/unittests.py
Packaging
- update version in setup.py
python setup.py sdist bdist_wheel
twine upload dist/*
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cloakensdk-0.0.8.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for cloakensdk-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5152937cd5a29aa6c25622feda81748aa253471bf9f897cfc3b675b437d38fa3 |
|
MD5 | cc433b25152176024ce7f9a4d45e0079 |
|
BLAKE2b-256 | 44502eb853ddd2ddaf8ac5b728706a871bf1748b5f2ec62f870fad00664f1403 |