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.3.tar.gz
(3.9 kB
view hashes)
Built Distributions
Close
Hashes for cloakensdk-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f923f4b317c95aa11c2cb96823e6ae40796d77ac9fb90ba607a0e5532897e23 |
|
MD5 | fb1b44a9e9909b31d82a18e57e86cb26 |
|
BLAKE2b-256 | b59fd441495f7fa787bb06541fad85fe69a1f8f6441d186c2ffd05e38b43351b |
Close
Hashes for cloakensdk-0.0.3-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a681686b1d8a5d81f9d83f085ea72b121c4eca10009c1bf7cae4602cf7aa8b17 |
|
MD5 | ec50118a1a36f37a6adcb9237f3211ab |
|
BLAKE2b-256 | 8dc680453d31c463cd99a28a13dd87a1048015814ef4aa2cbb10d2fab7019ca2 |