Skip to main content

Srvice is a library that aims to integrate a Python server with a Javascript client via remote calls. With Srvice, the client can transparently call functions defined in server. The server might also respond with instructions that execute arbitrary Javascript code in the client.

Let us define a function in the client:

from import srvice

@srvice.api
def get_user_email(request, username):
    if can_read_email(request.user, username):
        return email_from_username(username)
    else:
        raise PermissionError

# This function must be associated with some url in your application
urlpatterns [
    ...,
    '^get-user-email/$', get_user_email.as_view(),
]

In the client, we call the function defined in the some URL point using the srvice object:

srvice.call('get-user-email', 'paulmcartney').then(function (email) {
    var contact = currentContact();
    contact.email = email;
})

Communication is done using JSON strings that pass function arguments and results from client to server and vice-versa.

This is only the very basic that Srvice can do. Please check the documentation for more information.

Metadata

Release files for srvice 0.1.5

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

Source distribution (sdist)

Source distribution for srvice 0.1.5
File Size Uploaded Provenance
srvice-0.1.5.tar.gz 45.9 kB Without provenance Details

Release files / srvice-0.1.5.tar.gz

Download URL srvice-0.1.5.tar.gz
Size 45.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b01954a56a9a291883141eb458516b3e03740b2ba77372b553dad4f52930aa5d
BLAKE2b-256 checksum
How to use checksums
ff8c5f0b3ab6ae79378550e0e5ffbc979f7b9852ddba1deb33c1231a70e9bac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for srvice 0.1.5

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.

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