Skip to main content

Cacholong CLI, manage cloud environments at Cacholong!

Project description

CLI frontend

The API client library for managing various resources.

Client Library Documentation

Getting started

You will need an API-token. This token can be created using our panel at https://cp.cacholong.eu/#/user/settings/api. You can create an api token within your profile under API.

When running the command ccloud for the first time it will ask you for an API-token.

After that you will be able to run the following command:

ccloud accounts list

This will give you an overview of accounts where you have access to.

Usage

Overview of the possibilities:

ccloud --help

To fetch an overview of the dns-zones for an account:

ccloud dns-zones list --account <account uuid>

Creating a DNS-record:

ccloud dns-records create --dns-zone <dns-zone uuid> \
    --name localhost.example.com \
    --dns-record-type A \
    --content 127.0.0.1 \
    --ttl 300

Updating a DNS-record:

ccloud dns-records update <dns-record uuid> \
    --content 127.0.0.1

Deleting a DNS-record:

ccloud dns-records delete <dns-record uuid>

Every command includes an option --help which will give an overview of the possibilities.

Advanced usage

Its also possible to create your own command line utility to handle various parts. Here are the same examples as above but now using python.

Fetching DNS-zones

import asyncio

from cacholong_sdk.connection import connection
from cacholong_sdk import ResourceTuple, Inclusion, Filter
from cacholong_sdk import DnsZone, DnsZoneModel, DnsRecord, DnsRecordModel

async def main():
    async with connection('https://api.cacholong.eu/api/v1/', 'YOUR-API-TOKEN') as api:
        searchfilter = Filter(domain=sys.argv[1])
        DnsZoneCtrl = DnsZone(api)
        async for zone in DnsZoneCtrl.fetch_all(searchfilter):
            print(zone["domain"])

# Execute main function
asyncio.run(main())

Suggestions for a good README

Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.

Support

Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.

Roadmap

If you have ideas for releases in the future, it is a good idea to list them in the README.

Contributing

State if you are open to contributions and what your requirements are for accepting them.

For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.

You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.

License

For open source projects, say how it is licensed.

Project details


Download files

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

Source Distribution

cacholong_cloud_cli-0.3.3.tar.gz (30.9 kB view details)

Uploaded Source

Built Distribution

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

cacholong_cloud_cli-0.3.3-py3-none-any.whl (52.7 kB view details)

Uploaded Python 3

File details

Details for the file cacholong_cloud_cli-0.3.3.tar.gz.

File metadata

  • Download URL: cacholong_cloud_cli-0.3.3.tar.gz
  • Upload date:
  • Size: 30.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Linux/6.1.0-39-amd64

File hashes

Hashes for cacholong_cloud_cli-0.3.3.tar.gz
Algorithm Hash digest
SHA256 d2a860943e810ee29517f36a72c83b83e944773f86f06da0cf0c331bc338c804
MD5 4073c74082ffe6e0980b9b5db3ca0405
BLAKE2b-256 2002729dd534299a82f362315ef547b49fc53275f10da7c19c500a2edc12f091

See more details on using hashes here.

File details

Details for the file cacholong_cloud_cli-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: cacholong_cloud_cli-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 52.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.11.13 Linux/6.1.0-39-amd64

File hashes

Hashes for cacholong_cloud_cli-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 be07291af14572a7d49fd54790a70d5e71e5e4ed71a2f885507d919d153c0499
MD5 72aafdc43ad9ef658378df72d3886fec
BLAKE2b-256 ec50d6c9c395d218eee9ac44a858d7e2dbd052f65c673dee839bff7ecb2464f7

See more details on using hashes here.

Supported by

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