The library implements create short links via https://cli.com (Ex. cli.co) service.
Project description
clico
The library implements create short links via cli.com (Ex. cli.co) service.
cli.com documentation
Installation
$ pip install clico
Settings
Optional environment variables:
CLICO_API_KEY - Your API key
Using
from clico import Clico
from clico.models import Link, Domain, Integration
clico = Clico(api_key='YOUR_API_KEY')
or
clico = Clico() # If `CLICO_API_KEY` environment variable exists
single_link = clico.single_link(Link(**{
'domain': Domain.CLI_CO,
'target_url': 'https://google.com',
'callback_url': 'https://my-api.com/callback',
'is_deep': False,
'id_campaign': 'my-campaign',
'utm_phone': 'XXXXXXXXXXX',
'utm_source': 'twitter',
'utm_medium': 'banner',
'utm_campaign': '2019',
'utm_content': 'my ad',
'utm_term': 'term'
}))
multiple_links = clico.multiple_links([
Link(**{
'domain': Domain.CLI_CO,
'target_url': 'https://google.com',
'callback_url': 'https://my-api.com/callback'
}),
Link(**{
'domain': Domain.IN_SV,
'target_url': 'https://google.com',
'callback_url': 'https://my-api.com/callback',
'utm_phone': 'XXXXXXXXXXX',
'utm_term': 'term'
})
])
integration = clico.integration(Integration(**{
'callback_uri': 'https://my-api.com/callback',
'redirect_uri': 'https://google.com',
'user_data': {
'key': 'value'
}
}))
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
clico-0.2.tar.gz
(9.9 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
clico-0.2-py3-none-any.whl
(11.3 kB
view details)
File details
Details for the file clico-0.2.tar.gz.
File metadata
- Download URL: clico-0.2.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dc5d58cf908b8528b98442e9967bea095b175f7be046358c0fa6c313a79f9105
|
|
| MD5 |
5e97a6747ca26d6dcdf92a93a3aa824f
|
|
| BLAKE2b-256 |
d59c152002f48fa1541a702c02aab95d59c755b72edac2e7d203018e04fbc781
|
File details
Details for the file clico-0.2-py3-none-any.whl.
File metadata
- Download URL: clico-0.2-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a463ab830392fb12dcde6511461a91fad423705e1c2e90fcf42912f43cf274d
|
|
| MD5 |
ed2df8b1596e0848b8e5c46f0c07c8ef
|
|
| BLAKE2b-256 |
61b1a5e475da9354a5a3ef5c1a71bce90ad0c387338b78493047be2d6483abef
|