crank4y-connector
- A python library that allows you to register python web service to one or more
API GATEWAYcranker routers - it is the client endpoint of a
API GATEWAY
Dependencies:
- python >= 3.6
- numpy(optional, for better performance)
- requests
- yarl
- websocket-client == 0.57.0 (pls use this version, do not try higher version, trust me, there are bugs in higher versions)
Usage
-
There are mainly 4 steps:
pip install crank4py-connector- create a web service that hosts al requests on some path prefix, e.g.
/service-a/... - start a web service on a random port
- construct a
Configobject and start a connector
-
example
from flask import Flask
from crank4py_connector import Config
from crank4py_connector import create_and_start_connector
router_uris = ["wss://localhost:9070", "wss://localhost:9070"]
my_service_uri = "http://localhost:5000"
config = Config(my_service_uri, "service-a", router_uris, component_name="service-a-component")
connector = create_and_start_connector(config)
app = Flask(__name__, static_url_path="")
@app.route("/service-a/hello")
def hello():
return "hello"
app.run(host="localhost", port=5000)
# or you can refer to crank4py_connector
# and then you can query your api gateway to access your server-a. e.g. if your router listens on https://localhost:9000, then you can access https://localhost:9000/service-a/hello,
Metadata
Release files for crank4py-connector 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| crank4py_connector-0.0.5.tar.gz | 13.9 kB | Without provenance | Details for crank4py_connector-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| crank4py_connector-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for crank4py_connector-0.0.5-py3-none-any.whl |
Total release size: 30.1 kB
Release files / crank4py_connector-0.0.5.tar.gz
| Download URL | crank4py_connector-0.0.5.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5695428e3b6b6fb5cb22689e0503753fa42f50323b0d2d4a85c1a71fbe422f36
|
|
BLAKE2b-256 checksum How to use checksums |
12e5d71f297f8e9602e99016ea8ca46effe2a72297748db2d1443f1bf39bb6e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
|
Release files / crank4py_connector-0.0.5-py3-none-any.whl
| Download URL | crank4py_connector-0.0.5-py3-none-any.whl |
|---|---|
| Size | 16.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0eb00a812ae100bbf642f4af70f19ffe9165591a97dcff3a01cd02a15dba0ee0
|
|
BLAKE2b-256 checksum How to use checksums |
5c641606ca759f1369da60b9e19ab864ac84401e9869fedfa169e7bb811b9e52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.5
|
Security for crank4py-connector 0.0.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.