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:
```python
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:
1. set environment variables:
a. SERVER_URL = http://servername:port/
b. USERNAME
c. PASSWORD
2. python tests/unittests.py
Python SDK for cloaken
resources.py contains the enpoints to use to interact with Cloaken
# Examples:
```python
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:
1. set environment variables:
a. SERVER_URL = http://servername:port/
b. USERNAME
c. PASSWORD
2. python tests/unittests.py
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.2.tar.gz
(3.7 kB
view hashes)
Built Distributions
Close
Hashes for cloakensdk-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01df2602a8fe98e0136e752fc23de3358e0250671eb5b2ed1de26a5d76ae189a |
|
MD5 | 3cc1043cf25b552c2a927317209cc592 |
|
BLAKE2b-256 | 7a2d92ba8f6b0765276760af4de3fc404cbd830cd5bc7db62f64f8c45c9530f8 |
Close
Hashes for cloakensdk-0.0.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f094236d041824aa5df3c55b1a0ddcd8b2a34abbd0e8f30571a53642da383ef6 |
|
MD5 | 840afbad04b61b4e1416125bdc84a8d4 |
|
BLAKE2b-256 | fb771934f4398ea59002e61fc248a033b05712507224e16e7e4a4cf2ae2c4901 |