Skip to main content

Ocote

Ocote Logo

Ocote is a library built on flask allowing for a socket like connection with encryption to a flask sever.

Installation

pip install ocote

Usage

You need to setup a client side and a server side for example:

Client side:

import ocote.ocote as ocote

conn = ocote.connect("localhost:8000", "API_KEY")

conn.ping()                        # health check -> True/False
print(conn.func("add", 3, 4).value())     # call with args -> 7
print(conn.variable("my_data").value())   # fetch variable -> {"x": 42}
conn.object("cfg")                 # fetch via pickle -> RemoteResult
add = conn.lazy_func("add")        # get a local callable proxy
print(add(10, 20).value())                # -> 30

Server side:

import ocote.ocote as ocote

def add(a, b):
    return a + b

my_data = {"x": 42}

class Config:
    debug = True

srv = ocote.server()
srv.expose(
    funcs={"add": add},
    vars={"my_data": my_data},
    objects={"cfg": Config()}
)
srv.post("localhost:8000", api_key="API_KEY")

Download files

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

Source Distribution

ocote-0.2.0.tar.gz (62.9 kB view details)

Uploaded Source

Built Distribution

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

ocote-0.2.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file ocote-0.2.0.tar.gz.

File metadata

  • Download URL: ocote-0.2.0.tar.gz
  • Upload date:
  • Size: 62.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for ocote-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a1e7ceab7c12d19347970338691fc0795448520eda6d153f3b7c56650757b306
MD5 2a5bb6e8027ba5acc353b27b98f22970
BLAKE2b-256 a5710bfc55ab65d6f45074fcc1f546362637048b4602ae6d920500d24f15d368

See more details on using hashes here.

File details

Details for the file ocote-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ocote-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.4

File hashes

Hashes for ocote-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84953f37d0a799e465fdc0e204f112885cf7d81739c090bc5d58002abf54bce8
MD5 5f2fa1540e63e1c6dbe44bb81d4e730e
BLAKE2b-256 b27a61e53604517c09eb57040bce38b9e8eb2cdd47186a744b6d5e4c7ed9e7fc

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

0.1.0

2 files

Supported by

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