Skip to main content

Python client for URLR

Project description

urlr@3.0.1

PyPI - Version PyPI - Downloads PyPI - License

This SDK is automatically generated with the OpenAPI Generator project.

  • API version: 2.0.0
  • Package version: 3.0.1
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

For more information, please visit https://urlr.me/en

Installation & Usage

Requirements

Python 3.10+

pip install

pip install urlr

Then import the package:

import urlr

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import urlr

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import os
import urlr
from urlr.rest import ApiException

username = os.getenv("URLR_API_USERNAME")  # to be defined on your side
password = os.getenv("URLR_API_PASSWORD")  # to be defined on your side


# Access Tokens

configuration = urlr.Configuration()

with urlr.ApiClient(configuration) as api_client:
    access_token_api = urlr.AccessTokensApi(api_client)

    create_access_token_request = urlr.CreateAccessTokenRequest(
        username=username,
        password=password,
    )

    try:
        api_response = access_token_api.create_access_token(
            create_access_token_request=create_access_token_request)
    except ApiException as e:
        print("Exception when calling AccessTokensApi->create_access_token: %s\n" % e)
        quit()

configuration.access_token = api_response.token

# Create a link

with urlr.ApiClient(configuration) as api_client:
    links_api = urlr.LinksApi(api_client)
    create_link_request = urlr.CreateLinkRequest(
        url="",
        team_id=""
    )

    try:
        link = links_api.create_link(
            create_link_request=create_link_request)
    except Exception as e:
        print("Exception when calling LinksApi->create_link: %s\n" % e)

Complete examples can be found in the docs directory of the client repository.

API Endpoints

All URIs are relative to https://urlr.me/api/v2

Class Method HTTP request Description
DomainsApi domain_create POST /domains Create a domain
DomainsApi domain_get GET /domains/{domain_id} Get a domain
DomainsApi domain_list GET /domains List domains
FoldersApi folder_create POST /folders Create a folder
FoldersApi folder_get GET /folders/{folder_id} Get a folder
FoldersApi folder_list GET /folders List folders
LinksApi link_create POST /links Create a link
LinksApi link_delete DELETE /links/{link_id} Delete a link
LinksApi link_edit PATCH /links/{link_id} Edit a link
LinksApi link_get GET /links/{link_id} Get a link
LinksApi link_list GET /links List links
QRCodesApi qrcode_create POST /qrcodes Create a QR Code
StatisticsApi statistic_get GET /statistics Get statistics
WorkspacesApi workspace_get GET /workspaces/{workspace_id} Get a workspace
WorkspacesApi workspace_list GET /workspaces List workspaces of user

Models

Authorization

Authentication schemes defined for the API:

ApiKeyAuth

  • Type: API key
  • API key parameter name: X-API-KEY
  • Location: HTTP header

Get help / support

Please contact contact@urlr.me and we can take more direct action toward finding a solution.

Project details


Download files

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

Source Distribution

urlr-3.0.1.tar.gz (44.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

urlr-3.0.1-py3-none-any.whl (92.2 kB view details)

Uploaded Python 3

File details

Details for the file urlr-3.0.1.tar.gz.

File metadata

  • Download URL: urlr-3.0.1.tar.gz
  • Upload date:
  • Size: 44.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for urlr-3.0.1.tar.gz
Algorithm Hash digest
SHA256 d93027b471c94567edb914148448b35da33c2d185dce3c3b71a2632f975d5b3c
MD5 4489e9b90274783d1c9aa5aa91610569
BLAKE2b-256 944612223361350d9841d80ebccd8aabc22ccecd39894d279c53f58d4d13a8b7

See more details on using hashes here.

File details

Details for the file urlr-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: urlr-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 92.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for urlr-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1ac622caf5dc5a2514c5d9862f077bc46c45b936f02bcf43c3979904542478ac
MD5 3e43e228a74b7b12e607da88c1203473
BLAKE2b-256 3079d512f2d4c061e5f6b810351d63469edce9caae84442057f4c2ad3d6245a9

See more details on using hashes here.

Supported by

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