Skip to main content

SnipLink Py

Build status GitHub issues

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)

Source distribution for sniplink 1.0.0
File Size Uploaded
sniplink-1.0.0.tar.gz 4.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sniplink 1.0.0
File Interpreter ABI Platform
sniplink-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page