Skip to main content

URFP client Python module

Project description

URFP client Python module

Quick install

pip install urfp

-or-

pip install . # in repository

Init (HTTP)

from urfp.core import URFP
from urfp.http import URFPHttpConnector

def log_requests(url, parameter, http_response, text_response):
    print("URL:                 " + url)
    print("Query:               " + parameter)
    print("HTTP-Response Code:  " + http_response)
    print("Received Content:    " + text_response)

import requests
s = requests.session()
c = urfp.http.URFPHttpConnector('http://server.com', session=s, logger=log_requests)

or just (with one HTTP/1.0 session per request and no request logging)...

from urfp.core import URFP
from urfp.http import URFPHttpConnector

c = urfp.http.URFPHttpConnector('http://server.com')

Init (Tinypacket/UDP)

from urfp.core import URFP
from urfp.tinypacket import URFPTinypacketframe

c = URFPTinypacketFrame(server="10.0.10.62:6272")

Usage after Init

The elements named as listed by lv, lf etc. become attributes:

u = URFP(c)
u.set_variable("something_enabled", True)
print(u.get_variable("something_enabled")

res = u.call_function("arbitrary_func", {'argument': 123, 'second':'value'})

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

urfp-0.2.1.tar.gz (37.4 kB view details)

Uploaded Source

Built Distribution

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

urfp-0.2.1-py3-none-any.whl (23.4 kB view details)

Uploaded Python 3

File details

Details for the file urfp-0.2.1.tar.gz.

File metadata

  • Download URL: urfp-0.2.1.tar.gz
  • Upload date:
  • Size: 37.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.3 cpython/3.10.12 HTTPX/0.28.1

File hashes

Hashes for urfp-0.2.1.tar.gz
Algorithm Hash digest
SHA256 548aa95cbf4947b6151763566459307cecac08bd288ac3d18a88d22fe433ce0e
MD5 25cf1de9b5ee24ee151516a380370d79
BLAKE2b-256 350d09d9a7f46a57d13694d12efa1585aded3d3ec8627b600b6d678aa9fc17ba

See more details on using hashes here.

File details

Details for the file urfp-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: urfp-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 23.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.3 cpython/3.10.12 HTTPX/0.28.1

File hashes

Hashes for urfp-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f1ac2929d4f17013c25f00149b59940966de167d8cb5d3b5751fc520512986ce
MD5 db445b3df1130b4bc1148ca83c33ec36
BLAKE2b-256 a02d72bef1965d3c14613f3c749d11c45d4e801585d6b5d35a498dcfce892754

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