Skip to main content

aiounu

An asyncio module for unu in Python3 using aiohttp. Forked from vcinex/unu.

Install

pip install aiounu

Use

import aiounu as unu

test_url = "https://example.com/?test=52e838e8-0943-4ccb-bfd8-ae6bb3173bd2"
unu_resp = await unu.shorten(url=test_url, output_format="dot", keyword="")
print(unu_resp.shorturl)

Example Result

If output_format is set to dot (The default), the resulting JSON object properties will be accessible (Thanks to mo-dots) by both dot.notation and dict['notation'].

{
  "url": {
    "keyword": "kfuns",
    "url": "https://example.com/?test=52e838e8-0943-4ccb-bfd8-ae6bb3173bd2",
    "title": "Example Domain",
    "date": "2020-12-22 08:44:33",
    "ip": "22.42.219.59"
  },
  "status": "error",
  "message": "https://example.com/?test=52e838e8-0943-4ccb-bfd8-ae6bb[...] added to database<br/>(Could not check Google Safe Browsing: Bad Request)",
  "title": "Example Domain",
  "shorturl": "https://u.nu/kfuns",
  "statusCode": 200
}

Only the url variable is necessary. For a runnable example, see tests/test_shorten.py or clone the repo and run pytest.


MIT License

Metadata

Release files for aiounu 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiounu 0.1.3
File Size Uploaded Provenance Actions
aiounu-0.1.3.tar.gz 3.6 kB Without provenance Details for aiounu-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 7.0 kB

Release files / aiounu-0.1.3.tar.gz

Download URL aiounu-0.1.3.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
068d3feca22a4319ddd5748906add870f976cd39a15b2f6ea4ca14136a749260
BLAKE2b-256 checksum
How to use checksums
03fa838a958edf2df6933122ccd9d7b85c8560141975ed74ac43bc34515b0ac6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Release files / aiounu-0.1.3-py3-none-any.whl

Download URL aiounu-0.1.3-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c38ab6f9042794f5fd98ad532ad9d276ba28b85d98e5f44a2183a003cddda011
BLAKE2b-256 checksum
How to use checksums
054342378854df0d9eacc0c8db9142a839f242ff598f9526cece670a6a0e6b02
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.0

Security for aiounu 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

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