This release is a pre-release and may not be stable for production use.
FlagCloud
Python connectivity tools for cloud platforms. This alpha implements same-origin JSON reads with optional bearer authentication, bounded responses, and explicit timeout handling.
python -m pip install flagcloud==0.1.0a1
from getpass import getpass
from flagcloud import Client
# Replace both the origin and API path with your service's documented values.
with Client('https://your-cloud.example', token=getpass('Cloud token: ')) as cloud:
resources = cloud.get_json('/your-documented-resource-path', params={'limit': '10'})
print(resources)
No platform-specific endpoint is assumed. This release does not yet implement a dedicated Liangzhi Cloud authentication, workspace, scheduling, or task API. It can read existing HTTP JSON endpoints today, without publishing any private platform implementation.
Behavior
Client(base_url, token=None, timeout=30, max_response_bytes=8388608)accepts an HTTPS origin. HTTP is allowed only for loopback development.get_json(path, params=None)performs one GET and returns the decoded JSON. Pass query values throughparams; paths cannot select another origin.- Bearer tokens stay in memory. Exiting the context or calling
close()removes the token from the client; it does not revoke it at the service. - Redirects and automatic retries are disabled. This client has no task-submission or arbitrary POST method.
CloudError.status_coderecords HTTP failures. Exceptions omit response bodies and transport error details; no client logging is performed.- Timeout is per socket operation, not a whole-workflow deadline. Responses exceeding the configured byte limit and invalid JSON are rejected.
No third-party runtime dependencies; Python 3.10+. Python 3.12 is the tested baseline. Tests use local HTTP fixtures, not a live cloud deployment. Client instances are not intended for concurrent use. APIs may change during alpha.
Development
python -m pip install -e .
python -m unittest discover -s tests -v
Apache-2.0 licensed.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flagcloud-0.1.0a1.tar.gz.
File metadata
- Download URL: flagcloud-0.1.0a1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8112d988bbc4117d4213b416a6d24bc22e2d6d735fab5abae07acecc59a7e8e7
|
|
| MD5 |
6ef582e91f145922283f3517993d6d6a
|
|
| BLAKE2b-256 |
fef3e76e60fce61e07f3bb71a07e970297df6488c6f55fa124eaf5504d19e8df
|
File details
Details for the file flagcloud-0.1.0a1-py3-none-any.whl.
File metadata
- Download URL: flagcloud-0.1.0a1-py3-none-any.whl
- Upload date:
- Size: 8.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.12.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e77562dfdaf9a4142f10382125e076067c1099672acd75683dd56558d207263a
|
|
| MD5 |
26b5626d06daa041393ee077815a5c4c
|
|
| BLAKE2b-256 |
5fdf43342507754cc1cc9ba5a5d35891a10186f56f15d0511c3a763d6b4b27be
|