cccAPI


NamecccAPI JSON
Version 0.0.14 PyPI version JSON
download
home_pagehttps://github.com/atripathy86/cccAPI
SummaryPython API Client for CCC
upload_time2025-07-29 21:01:13
maintainerNone
docs_urlNone
authorAalap Tripathy
requires_python>=3.6
licenseMIT
keywords ccc compute cluster controller fleet api client hpc
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ccc_client

This package provides a simple, modular SDK for the CCC REST API.

## Features

* Automatically handles authentication and renewal
* Graceful error management
* Logically organized modules
* Easily maintained

## Installation

**Requirements:**
* Python 3.8 or higher
* Required packages: requests>=2.26.0, jsonschema>=4.23.0

**Install using `pip`:**

```bash
pip install cccAPI 
```

**Install from source:**

```bash
git clone https://github.hpe.com/hpe/cccAPI.git
cd cccAPI
pip install -e .
```

## Quick Start

### Initialize the Client
```python
import json
from cccAPI import cccAPIClient
client = cccAPIClient("https://localhost:8000/cmu/v1", "root", "your-password")
```

### Example Usage

#### Get Nodes

```python
nodes = client.nodes.show_nodes()
print(json.dumps(nodes, indent=4))
```

#### Get specific Node

```python
#Specific node named Node1
node = client.nodes.show_node("Node1")
print(json.dumps(node, indent=4))
```

#### Get specific Node/fields 
- Allowed fields are: 

```python 
query_params = {"fields": "name,id,uuid,network.name,network.ipAddress,network.macAddress"}
specific_nodes=client.nodes.show_nodes(query_params)
print(json.dumps(specific_nodes, indent=4))
```

See `examples/test.py` for other test cases as implemented

## API Modules

| Module | Description | User Guide Section |
|---------|-------------|------------------|
| `nodes` | Node Operations: Create/Delete/Update/List Nodes, Add/Remove nodes in groups, Manage node features | Section 4.5 |
| `image_groups` | Image Group Operations | Section 4.3 |
| `network_groups` | Network Group Operations | Section 4.4 |
| `custom_groups` | Custom Group Operations | Section 4.2 |
| `resource_features` | Resource Features Management | Section 4.8 |
| `image_capture_deployment` | Image Capture and Deployment Operations | Section 4.9 |
| `power_operation` | Power Operations Management | Section 4.10 |
| `application` | Application Entrypoints and Settings | Section 4.1 |
| `architecture` | Architecture Management | Section 4.11 |
| `management_cards` | Network Devices, Interfaces, and Routes Management | Section 4.12 |
| `tasks` | Tasks Operations | Section 4.7 |
| `conn` | Sessions Operations | Section 4.6 |

## Building and Publishing

### Local Development

There are several ways to install the package for local development:

1. Direct pip install:
```bash
pip install .
```

2. Using pip-tools (recommended for development):
```bash
pip install pip-tools
pip-compile pyproject.toml  # Produces requirements.txt
pip install -r requirements.txt
```

3. Using uv (faster installation):
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
uv pip install -e . --system
```

4. Building distribution packages:
```bash
pip install build
python -m build  # Creates dist/ with tar.gz and .whl
```

### Publishing to PyPI

1. Ensure you have the required tools:
```bash
pip install setuptools wheel twine
```

2. Build the distribution:
```bash
python -m build
# Or alternatively:
# python3 setup.py sdist bdist_wheel
```

3. Upload to PyPI (requires ~/.pypirc with PyPI token):
```bash
twine upload dist/*
```

You can verify the installation by downloading the published package:
```bash
pip install cccAPI=={version}  # Replace {version} with desired version
```
## License

This project is license under the [MIT license](LICENSE).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/atripathy86/cccAPI",
    "name": "cccAPI",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "ccc, compute cluster controller, fleet, api, client, hpc",
    "author": "Aalap Tripathy",
    "author_email": "Aalap Tripathy <atripathy.bulk@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/fc/d9/dd9a2dd313f07ec50e4c778007ef784a8ef87f541cba8baff941315c69d3/cccapi-0.0.14.tar.gz",
    "platform": null,
    "description": "# ccc_client\n\nThis package provides a simple, modular SDK for the CCC REST API.\n\n## Features\n\n* Automatically handles authentication and renewal\n* Graceful error management\n* Logically organized modules\n* Easily maintained\n\n## Installation\n\n**Requirements:**\n* Python 3.8 or higher\n* Required packages: requests>=2.26.0, jsonschema>=4.23.0\n\n**Install using `pip`:**\n\n```bash\npip install cccAPI \n```\n\n**Install from source:**\n\n```bash\ngit clone https://github.hpe.com/hpe/cccAPI.git\ncd cccAPI\npip install -e .\n```\n\n## Quick Start\n\n### Initialize the Client\n```python\nimport json\nfrom cccAPI import cccAPIClient\nclient = cccAPIClient(\"https://localhost:8000/cmu/v1\", \"root\", \"your-password\")\n```\n\n### Example Usage\n\n#### Get Nodes\n\n```python\nnodes = client.nodes.show_nodes()\nprint(json.dumps(nodes, indent=4))\n```\n\n#### Get specific Node\n\n```python\n#Specific node named Node1\nnode = client.nodes.show_node(\"Node1\")\nprint(json.dumps(node, indent=4))\n```\n\n#### Get specific Node/fields \n- Allowed fields are: \n\n```python \nquery_params = {\"fields\": \"name,id,uuid,network.name,network.ipAddress,network.macAddress\"}\nspecific_nodes=client.nodes.show_nodes(query_params)\nprint(json.dumps(specific_nodes, indent=4))\n```\n\nSee `examples/test.py` for other test cases as implemented\n\n## API Modules\n\n| Module | Description | User Guide Section |\n|---------|-------------|------------------|\n| `nodes` | Node Operations: Create/Delete/Update/List Nodes, Add/Remove nodes in groups, Manage node features | Section 4.5 |\n| `image_groups` | Image Group Operations | Section 4.3 |\n| `network_groups` | Network Group Operations | Section 4.4 |\n| `custom_groups` | Custom Group Operations | Section 4.2 |\n| `resource_features` | Resource Features Management | Section 4.8 |\n| `image_capture_deployment` | Image Capture and Deployment Operations | Section 4.9 |\n| `power_operation` | Power Operations Management | Section 4.10 |\n| `application` | Application Entrypoints and Settings | Section 4.1 |\n| `architecture` | Architecture Management | Section 4.11 |\n| `management_cards` | Network Devices, Interfaces, and Routes Management | Section 4.12 |\n| `tasks` | Tasks Operations | Section 4.7 |\n| `conn` | Sessions Operations | Section 4.6 |\n\n## Building and Publishing\n\n### Local Development\n\nThere are several ways to install the package for local development:\n\n1. Direct pip install:\n```bash\npip install .\n```\n\n2. Using pip-tools (recommended for development):\n```bash\npip install pip-tools\npip-compile pyproject.toml  # Produces requirements.txt\npip install -r requirements.txt\n```\n\n3. Using uv (faster installation):\n```bash\ncurl -LsSf https://astral.sh/uv/install.sh | sh\nuv pip install -e . --system\n```\n\n4. Building distribution packages:\n```bash\npip install build\npython -m build  # Creates dist/ with tar.gz and .whl\n```\n\n### Publishing to PyPI\n\n1. Ensure you have the required tools:\n```bash\npip install setuptools wheel twine\n```\n\n2. Build the distribution:\n```bash\npython -m build\n# Or alternatively:\n# python3 setup.py sdist bdist_wheel\n```\n\n3. Upload to PyPI (requires ~/.pypirc with PyPI token):\n```bash\ntwine upload dist/*\n```\n\nYou can verify the installation by downloading the published package:\n```bash\npip install cccAPI=={version}  # Replace {version} with desired version\n```\n## License\n\nThis project is license under the [MIT license](LICENSE).\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python API Client for CCC",
    "version": "0.0.14",
    "project_urls": {
        "Documentation": "https://github.com/atripathy86/cccAPI",
        "Homepage": "https://github.com/atripathy86/cccAPI",
        "Issues": "https://github.com/atripathy86/cccAPI/issues",
        "Source": "https://github.com/atripathy86/cccAPI"
    },
    "split_keywords": [
        "ccc",
        " compute cluster controller",
        " fleet",
        " api",
        " client",
        " hpc"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "9bbc01db041fe9f1d16ee575a7b1aaef58b06b697f0c7ad754bf8d51c69318bd",
                "md5": "c7904ed32f549cbfe427c2a5f272b565",
                "sha256": "e961b919a25db3d28e117e1ae8c5c0f35d4d2d622f3a3d3b47f8af74b395fdd7"
            },
            "downloads": -1,
            "filename": "cccapi-0.0.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c7904ed32f549cbfe427c2a5f272b565",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 30029,
            "upload_time": "2025-07-29T20:59:24",
            "upload_time_iso_8601": "2025-07-29T20:59:24.133425Z",
            "url": "https://files.pythonhosted.org/packages/9b/bc/01db041fe9f1d16ee575a7b1aaef58b06b697f0c7ad754bf8d51c69318bd/cccapi-0.0.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fcd9dd9a2dd313f07ec50e4c778007ef784a8ef87f541cba8baff941315c69d3",
                "md5": "279d3a5bae2127a0dbae87ac10e21e72",
                "sha256": "89eacaa3abeec6a10b087806030c5134b6d73953b9fc87aae8c8a67054abd15d"
            },
            "downloads": -1,
            "filename": "cccapi-0.0.14.tar.gz",
            "has_sig": false,
            "md5_digest": "279d3a5bae2127a0dbae87ac10e21e72",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 21499,
            "upload_time": "2025-07-29T21:01:13",
            "upload_time_iso_8601": "2025-07-29T21:01:13.195378Z",
            "url": "https://files.pythonhosted.org/packages/fc/d9/dd9a2dd313f07ec50e4c778007ef784a8ef87f541cba8baff941315c69d3/cccapi-0.0.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-07-29 21:01:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "atripathy86",
    "github_project": "cccAPI",
    "github_not_found": true,
    "lcname": "cccapi"
}
        
Elapsed time: 2.00657s