Skip to content

Libraries

citric

GitHub Repo stars

A client to the LimeSurvey Remote Control API 2, written in modern Python.

use_citric.py
from citric import Client

# Connect to your LimeSurvey instance
client =  Client(
    "https://mylimesite.limequery.com/admin/remotecontrol",
    "myusername",
    "mypassword",
)

# Print the LimeSurvey version
print(client.get_server_version())

# Print every survey's title
for survey in client.list_surveys():
    print(survey["surveyls_title"])

pep610

GitHub Repo stars

PEP 610 Direct URL data parser.

use_pep610.py
from importlib import metadata

import pep610

dist = metadata.distribution("pep610")

match data := pep610.read_from_distribution(dist):
    case pep610.DirData(url, pep610.DirInfo(editable=True)):
        print("Editable installation, a.k.a. in development mode")
    case _:
        print("Not an editable installation")

backports.httpmethod

GitHub Repo stars

A backport of Python 3.11+ http.HTTPMethod enum for Python 3.7+.

use_httpmethod.py
import sys

import requests

if sys.version_info >= (3, 11):
    from http import HTTPMethod
else:
    from backports.httpmethod import HTTPMethod


response = requests.request(HTTPMethod.GET, "https://httpbin.org/get")