Skip to main content

A Python client for Yun.ir URL shortener API

Project description

Yun.ir Python Client

A Python client for the Yun.ir URL shortener API.

Installation

Install with pip:

pip install yun-ir

Usage

from yun import Yun

login = Yun.Api('YOUR tOKEN')
result = login.short('title', 'url')

print(result)

API

yun_ir.Yun(token: str)

Create a new Yun.ir client instance.

token: Your Yun.ir API token.

yun_ir.Yun.short(title: str, url: str) -> dict

Shorten a URL using Yun.ir API.

title: Title for the URL

url: URL to shorten

Returns:

A dictionary containing the shortened URL, or an error message if the request fails.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yun-ir-1.0.tar.gz (2.1 kB view hashes)

Uploaded Source

Built Distribution

yun_ir-1.0-py3-none-any.whl (14.6 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page