SnipLink Py
An API wrapper for SnipLink written in Python.
Official SnipLink API docs found here.
All aspects of the v1 endpoint are currently implemented.
Installation
Install the package using pip as follows
pip install sniplink
and now you are ready to go!
Usage
For example,
- Information on a shortlink can be retrieved as such:
# first of all, importing the library, in order to
# access functions provided by the library
import sniplink
# sniplink-py is powered by a backend client
# here we creates a new instance of client
client = sniplink.Client()
# get_link takes one parameter,
# public_id, that is the id of shortened link you want to fetch
client.get_link("123")
- creation of a shortlink can be done as follows:
# first of all, importing the library, in order to
# access functions provided by the library
import sniplink
# sniplink-py is powered by a backend client
# here we creates a new instance of client
client = sniplink.Client
# create_link takes two parameters,
# expires_in value, that is a unix timestamp
# url value, that is the url you want to shorten
client.create_link(1627168204, "https://example.com")
Have a look at the samples provided for further usage instructions.
You can find a list of endpoints over on SnipLink's API docs. Each of these endpoints has an equivalent wrapper method in the library.
Requirements
> pip install requests
License
This project is available under a MIT license.
Metadata
Release files for sniplink 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sniplink-1.0.0.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sniplink-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.5 kB
Release files / sniplink-1.0.0.tar.gz
| Download URL | sniplink-1.0.0.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb13dc7fa6d506a9e662b242cee77085caf42efef53f404b2288bbbf00f1e663
|
|
BLAKE2b-256 checksum How to use checksums |
cf67bf32e06bf4142e0a1b223087dd870fd4fc360100dc4a476b6043720db1fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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.8.9
|
Release files / sniplink-1.0.0-py3-none-any.whl
| Download URL | sniplink-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7798c844ab93bcda6b3210ecda3399bcfa28f39a7e66f42c2eff89de96cbd472
|
|
BLAKE2b-256 checksum How to use checksums |
6ca5b5c2358a8d655a048840eb8284c42f9e8ff49f849f98bf55015546729e70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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.8.9
|