Skip to main content

Python client for URLR

Project description

urlr@2.13.0

PyPI - Version PyPI - Downloads PyPI - License

This SDK is automatically generated with the OpenAPI Generator project.

  • API version: 1.12
  • Package version: 2.13.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

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

Installation & Usage

Requirements

Python 3.9+

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)

A complete example is available here.

API Endpoints

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

Class Method HTTP request Description
AccessTokensApi create_access_token POST /access_tokens/create Get an access token
AccessTokensApi refresh_access_token POST /access_tokens/refresh Refresh an access token
DomainsApi create_domain POST /domains/create Create a domain
FoldersApi create_folder POST /folders/create Create a folder
FoldersApi get_folders GET /folders/{team_id} Get folders of workspace
LinksApi create_link POST /links/create Create a link
LinksApi edit_link PATCH /links/{link_id} Edit a link
LinksApi get_link GET /links/{link_id} Get a link
LinksApi list_links GET /links List links
QRCodesApi create_qr_code POST /qrcodes/create Create a QR Code
StatisticsApi get_statistics POST /statistics Get statistics of a link
WorkspacesApi get_teams GET /teams Get workspaces of user

Models

Authorization

Authentication schemes defined for the API:

bearerAuth

  • Type: Bearer authentication (JWT)

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-2.13.0.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

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

urlr-2.13.0-py3-none-any.whl (99.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for urlr-2.13.0.tar.gz
Algorithm Hash digest
SHA256 a127e2cc2cb907681e94ffbfa555537cec67d6de9bdb5f9ef7c5004f56889cc9
MD5 85cd6cd6bc22ecabf098279bfa3237cb
BLAKE2b-256 51d70a6a5777265a9cdba6f83d3f25a1c488e6232601b9c811f7b35349f0126b

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for urlr-2.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a6d2b65422589477c906b45a0ee9948a414f4e75147e4b362323745d7bfdc758
MD5 73e3d1ef4c7e7f4e173b93004ee27043
BLAKE2b-256 e0c7cfba74f01ef850bbfb74c2736fd389d67097094216c9abfa79fb0684849a

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