akamai-network-lists


Nameakamai-network-lists JSON
Version 0.0.4 PyPI version JSON
download
home_pageNone
SummaryAn Akamai CLI package for interacting with the Network Lists API
upload_time2024-08-23 14:30:34
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Akamai Network Lists

A package for [Akamai CLI](https://github.com/akamai/cli) to interact with the Network Lists API.
An API summary can be found [here](https://techdocs.akamai.com/network-lists/reference/api-summary).

## Usage

```
Usage: akamai_network_lists [OPTIONS] COMMAND [ARGS]...

Options:
  -e, --edgerc        Location of the credentials file [$AKAMAI_EDGERC]
  -s, --section       Section of the credentials file [$AKAMAI_EDGERC_SECTION]
  -a, --account-key   Account Key
  --version           Show the version and exit.
  -h, --help          Show this message and exit.

Commands:
  activate             Activate Network List
  activation-snapshot  Get Activation Snapshot
  activation-status    Get Activation Status
  add-element          Add Network List Element
  append               Append Elements to Network List
  create               Create Network List
  delete               Delete Network List
  help                 Show help information
  list                 List Network Lists
  remove-element       Remove Network List Element
  retrieve             Retrieve Network List
  update               Update Network List
  update-details       Update Network List details
```

## Development

This project is using [hatch](https://hatch.pypa.io/latest/) as it's build system. For this reason I also used it to manage the development environment. The following commands can be used to create and activate a virtual environment. Alternatively you're free to use the Python `venv` module.

You may need to [install](https://hatch.pypa.io/latest/install/) `hatch` (`pip install hatch`)

```bash
hatch env create
hatch shell
```


The main "binary" is located in `bin/akamai-network-lists.py`. The reason is because the akamai-cli tool has it's own format a python module must adhere to. It [looks for files](https://github.com/akamai/cli/blob/20c6521bfe3cb129bc5a41c81e206bba27e40efd/pkg/commands/command.go#L372) under the `bin` directory that [match the pattern](https://github.com/akamai/cli/blob/20c6521bfe3cb129bc5a41c81e206bba27e40efd/pkg/commands/command.go#L286) of `akamai-command-name`.

We also [need to list our dependencies](https://github.com/akamai/cli/blob/20c6521bfe3cb129bc5a41c81e206bba27e40efd/pkg/packages/python.go#L128) in a `requirements.txt` file, as we are using `pyproject.toml` to define our build system requirements and dependencies, this means we have only included `akamai-network-lists` in `requirements.txt` and this module will be installed from [PyPi](https://pypi.org/project/akamai-network-lists/).

There is some information in the [README.md](https://github.com/akamai/cli/blob/20c6521bfe3cb129bc5a41c81e206bba27e40efd/README.md#command-package-metadata) for akamai-cli, but a lot of the specifics seem un-written..

## Build

```bash
python3 -m pip install --upgrade build
python3 -m pip install --upgrade twine

python3 -m build
python3 -m twine upload dist/*
```


## Install in akamai-cli

```bash
# i'm using ubuntu 22.04 and there's an issue with the default python pip package
# for that reason i need to use a later version of python that the akamai-cli
# can use, the following three lines may not be necessary on any other configuration
python3.11 -m venv test_venv
source test_venv/bin/activate
PYTHONUSERBASE="test_venv/lib/python3.11/site-packages"

akamai install https://github.com/ryanlinnit-sky/akamai-cli-network-lists.git

akamai network-lists
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "akamai-network-lists",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Ryan <ryan.linnit@sky.uk>",
    "download_url": "https://files.pythonhosted.org/packages/e0/67/fa52ca9d49387fc7f2f7875e68830a8cc545d948664870b05f84136ff99e/akamai_network_lists-0.0.4.tar.gz",
    "platform": null,
    "description": "# Akamai Network Lists\n\nA package for [Akamai CLI](https://github.com/akamai/cli) to interact with the Network Lists API.\nAn API summary can be found [here](https://techdocs.akamai.com/network-lists/reference/api-summary).\n\n## Usage\n\n```\nUsage: akamai_network_lists [OPTIONS] COMMAND [ARGS]...\n\nOptions:\n  -e, --edgerc        Location of the credentials file [$AKAMAI_EDGERC]\n  -s, --section       Section of the credentials file [$AKAMAI_EDGERC_SECTION]\n  -a, --account-key   Account Key\n  --version           Show the version and exit.\n  -h, --help          Show this message and exit.\n\nCommands:\n  activate             Activate Network List\n  activation-snapshot  Get Activation Snapshot\n  activation-status    Get Activation Status\n  add-element          Add Network List Element\n  append               Append Elements to Network List\n  create               Create Network List\n  delete               Delete Network List\n  help                 Show help information\n  list                 List Network Lists\n  remove-element       Remove Network List Element\n  retrieve             Retrieve Network List\n  update               Update Network List\n  update-details       Update Network List details\n```\n\n## Development\n\nThis project is using [hatch](https://hatch.pypa.io/latest/) as it's build system. For this reason I also used it to manage the development environment. The following commands can be used to create and activate a virtual environment. Alternatively you're free to use the Python `venv` module.\n\nYou may need to [install](https://hatch.pypa.io/latest/install/) `hatch` (`pip install hatch`)\n\n```bash\nhatch env create\nhatch shell\n```\n\n\nThe main \"binary\" is located in `bin/akamai-network-lists.py`. The reason is because the akamai-cli tool has it's own format a python module must adhere to. It [looks for files](https://github.com/akamai/cli/blob/20c6521bfe3cb129bc5a41c81e206bba27e40efd/pkg/commands/command.go#L372) under the `bin` directory that [match the pattern](https://github.com/akamai/cli/blob/20c6521bfe3cb129bc5a41c81e206bba27e40efd/pkg/commands/command.go#L286) of `akamai-command-name`.\n\nWe also [need to list our dependencies](https://github.com/akamai/cli/blob/20c6521bfe3cb129bc5a41c81e206bba27e40efd/pkg/packages/python.go#L128) in a `requirements.txt` file, as we are using `pyproject.toml` to define our build system requirements and dependencies, this means we have only included `akamai-network-lists` in `requirements.txt` and this module will be installed from [PyPi](https://pypi.org/project/akamai-network-lists/).\n\nThere is some information in the [README.md](https://github.com/akamai/cli/blob/20c6521bfe3cb129bc5a41c81e206bba27e40efd/README.md#command-package-metadata) for akamai-cli, but a lot of the specifics seem un-written..\n\n## Build\n\n```bash\npython3 -m pip install --upgrade build\npython3 -m pip install --upgrade twine\n\npython3 -m build\npython3 -m twine upload dist/*\n```\n\n\n## Install in akamai-cli\n\n```bash\n# i'm using ubuntu 22.04 and there's an issue with the default python pip package\n# for that reason i need to use a later version of python that the akamai-cli\n# can use, the following three lines may not be necessary on any other configuration\npython3.11 -m venv test_venv\nsource test_venv/bin/activate\nPYTHONUSERBASE=\"test_venv/lib/python3.11/site-packages\"\n\nakamai install https://github.com/ryanlinnit-sky/akamai-cli-network-lists.git\n\nakamai network-lists\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An Akamai CLI package for interacting with the Network Lists API",
    "version": "0.0.4",
    "project_urls": {
        "Homepage": "https://github.com/ryanlinnit-sky/akamai-cli-network-lists",
        "Issues": "https://github.com/ryanlinnit-sky/akamai-cli-network-lists/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0627720ff646e88594b9c7395518977440ae98f726cd0b414f2aa3dd3a22106a",
                "md5": "486ad04144d0b8b6dcb9c5199950ad5a",
                "sha256": "aaea4bc1c23f77a5629ccfb1c9a55beb960047b0ff57d1e2702a0ac2dc660750"
            },
            "downloads": -1,
            "filename": "akamai_network_lists-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "486ad04144d0b8b6dcb9c5199950ad5a",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 3897,
            "upload_time": "2024-08-23T14:30:32",
            "upload_time_iso_8601": "2024-08-23T14:30:32.140724Z",
            "url": "https://files.pythonhosted.org/packages/06/27/720ff646e88594b9c7395518977440ae98f726cd0b414f2aa3dd3a22106a/akamai_network_lists-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e067fa52ca9d49387fc7f2f7875e68830a8cc545d948664870b05f84136ff99e",
                "md5": "a54e203a714f1860883bd72884610852",
                "sha256": "0c79e77b41f8cb70d5651f6505758a7267252180e0e16b91ae07bce16fbf5421"
            },
            "downloads": -1,
            "filename": "akamai_network_lists-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a54e203a714f1860883bd72884610852",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5291,
            "upload_time": "2024-08-23T14:30:34",
            "upload_time_iso_8601": "2024-08-23T14:30:34.580008Z",
            "url": "https://files.pythonhosted.org/packages/e0/67/fa52ca9d49387fc7f2f7875e68830a8cc545d948664870b05f84136ff99e/akamai_network_lists-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-23 14:30:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ryanlinnit-sky",
    "github_project": "akamai-cli-network-lists",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "akamai-network-lists"
}
        
Elapsed time: 1.15108s