Metadata-Version: 2.4
Name: flagcloud
Version: 0.1.0a1
Summary: Configurable JSON read client for cloud services
Author: FlagQuantum Team
License-Expression: Apache-2.0
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# FlagCloud

Python connectivity tools for cloud platforms. This alpha implements
same-origin JSON reads with optional bearer authentication, bounded responses,
and explicit timeout handling.

```bash
python -m pip install flagcloud==0.1.0a1
```

```python
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 through `params`; 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_code` records 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

```bash
python -m pip install -e .
python -m unittest discover -s tests -v
```

Apache-2.0 licensed.
