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 details)
Built Distribution
File details
Details for the file cloakensdk-0.0.8.tar.gz
.
File metadata
- Download URL: cloakensdk-0.0.8.tar.gz
- Upload date:
- Size: 5.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3cff1cc843f663591e2d7c7bcc440def3652ad82e2154c6529d4b417e54a834 |
|
MD5 | e0b2dc9197914fd6b2b4d6b94483df66 |
|
BLAKE2b-256 | 93403f72aad54cb8b019850598181d6439334c33f9e16377b714b17afb98cc6d |
File details
Details for the file cloakensdk-0.0.8-py3-none-any.whl
.
File metadata
- Download URL: cloakensdk-0.0.8-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5152937cd5a29aa6c25622feda81748aa253471bf9f897cfc3b675b437d38fa3 |
|
MD5 | cc433b25152176024ce7f9a4d45e0079 |
|
BLAKE2b-256 | 44502eb853ddd2ddaf8ac5b728706a871bf1748b5f2ec62f870fad00664f1403 |