{ "info": { "author": "Kevin Tewouda", "author_email": "lewoudar@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Console", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP", "Topic :: Terminals" ], "description": "# ib-client\n\n[![Pypi version](https://img.shields.io/pypi/v/ib-client.svg)](https://pypi.org/project/ib-client/)\n[![Build Status](https://travis-ci.com/lewoudar/ib_client.svg?branch=master)](https://travis-ci.com/lewoudar/ib_client)\n[![Windows Build Status](https://img.shields.io/appveyor/ci/lewoudar/ib-client/master.svg?label=Windows)](https://ci.appveyor.com/project/lewoudar/ib-client)\n[![Coverage Status](https://codecov.io/gh/lewoudar/ib_client/branch/master/graphs/badge.svg?branch=master&token=J6NUl2epJX)](https://codecov.io/gh/lewoudar/ib_client)\n[![Documentation Status](https://readthedocs.org/projects/ib-client/badge/?version=latest)](https://ib-client.readthedocs.io/en/latest/?badge=latest)\n[![License Apache 2](https://img.shields.io/hexpm/l/plug.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nThe simplest infoblox client!\n\n## Why another infoblox client?\n\nThis may be the first question that come to your mind if you know that there is already \na [client](https://infoblox-client.readthedocs.io/en/stable/) supported by Infoblox.\n\nThe answer is **genericity**. I try to be the more generic as possible to support all the objects proposed by the \ninfoblox API through the instropection of its API. If you know the [wapi](https://ipam.illinois.edu/wapidoc)\ndocumentation of an object / function, you will know how to use through the client which has a *simple* and\n*intuitive* API.\n\n## Installation\n\n```bash\npip install ib-client\n```\n\n**N.B: ib-client works starting from python 3.6**\n\n## Documentation\n\nThe documentation is available at https://ib-client.readthedocs.io/en/stable/.\n\n## Features\n\n- A client that allows you to perform all the operations available in the infoblox api.\n- A CLI that allows you to quickly perform the same operations as you will do with the client.\n- Ability to perform custom \n[requests](https://ipam.illinois.edu/wapidoc/additional/samplebodyrequests.html#samplebody-single).\n- Ability to load `.env` files to configure the client or the CLI.\n\n\n## Usage\n\n### Client\n\nHere is how you can instantiate the client.\n\n````python\nfrom infoblox import Client\n\nclient = Client(url='https://foo.com/wapi/v2.8', user='foo', password='foo')\n````\n\nTo create a network:\n\n```python\nnetwork = client.get_object('network')\nnetwork.create(network='10.1.0.0/16')\n```\n\nTo read all networks created:\n\n```python\nnetwork.get()\n```\n\nYou will have an output similar to the following:\n\n```json\n[\n {\n \"_ref\": \"network/ZG5zLm5ldHdvcmskMTAuMS4wLjAvMTYvMA:10.1.0.0%2F16\",\n \"network\": \"10.1.0.0/16\",\n \"network_view\": \"default\"\n },\n {\n \"_ref\": \"network/ZG5zLm5ldHdvcmskMTAuMi4wLjAvMTYvMA:10.2.0.0%2F16\",\n \"network\": \"10.2.0.0/16\",\n \"network_view\": \"default\"\n }\n]\n```\n\nTo modify a network:\n\n```python\nnetwork.update(object_ref='network/ZG5zLm5ldHdvcmskMTAuMS4wLjAvMTYvMA:10.1.0.0/16', comment='just a comment')\n```\n\nIf you want to search for the network modified, you can do this:\n\n```python\nnetwork.get(params={'comment~': 'just'}, return_fields=['network', 'networkview', 'comment'])\n```\n\nIt is also interesting to notice in the last call how we filtered the fields to be returned. The output contains the\nnetwork modified previously.\n\n```json\n[\n {\n \"_ref\": \"network/ZG5zLm5ldHdvcmskMTAuMS4wLjAvMTYvMA:10.1.0.0%2F16\",\n \"comment\": \"just a comment\",\n \"network\": \"10.1.0.0/16\",\n \"network_view\": \"default\"\n }\n]\n```\n\n**N.B:** the reference is always returned, so this is why we don't need to mention it in the `return_fields` parameter.\n\nFinally to delete a network, you can perform this call:\n\n```python\nnetwork.delete(object_ref='network/ZG5zLm5ldHdvcmskMTAuMS4wLjAvMTYvMA:10.1.0.0/16')\n```\n\nSimple enough!\n\n### CLI\n\nBefore using the CLI, you will have to set 3 environment variables, otherwise you will have an error. The 3 environment\nvariables are:\n- **IB_URL:** the wapi infoblox url like https://foo/wapi/v2.8\n- **IB_USER:** the user to connect to\n- **IB_PASSWORD:** the user's password\n\nIf you don't want to repeat these actions, you can create a **.env** file in the directory where you want to use the CLI.\nYou need to provide the above information in the form `KEY=VALUE`, one per line.\n\nThe cli has *help information* available to help you quickly understand how to use it\n\n```bash\nib -h\nUsage: ib [OPTIONS] COMMAND [ARGS]...\n\n Infoblox Command Line Interface. It allows you to interact with infoblox\n in the same way you will do with the python api client.\n\nOptions:\n --version Show the version and exit.\n -h, --help Show this message and exit.\n\nCommands:\n object Performs various object operations.\n objects Lists the available objects supports by the infoblox...\n request Makes a custom request using the request object of...\n schema Shows the api schema.\n shell-completion Installs shell completion.\n```\n\nEach command also has help information available through the `-h` option.\nYou can activate the shell completion on **bash**, **fish**, **zsh** and **Powershell** by doing the following command:\n\n```bash\nib shell-completion\n```\n\n**Note:** On Powershell, you may encounter an error in non administrator mode and if you are in administrator mode,\nand you still encounter an error like the following:\n\n```bash\nSet-ExecutionPolicy : Windows PowerShell updated your execution policy successfully, but the setting is overridden\nby a policy defined at a more specific scope. Due to the override, your shell will retain its current effective\nexecution policy of Bypass. Type \"Get-ExecutionPolicy -List\" to view your execution policy settings.\nFor more information please see \"Get-Help Set-ExecutionPolicy\".\n```\n\nPlease refer to [microsoft documentation](http://go.microsoft.com/fwlink/?LinkId=821719) to know how to fix the issue.\n\nWe will now perform the same operations realized in the client part.\n\nCreate a network:\n\n```bash\nib object -n network create -a '{\"network\": \"10.1.0.0/16\"}'\n```\n\nNotes: \n- the `-n` option after `object` command specifies the object to work on.\n- On Powershell, you will need a different syntax to escape properly json arguments:\n\n```bash\nib object -n network create -a \"{\\\"network\\\": \\\"10.1.0.0/16\\\"}\"\n```\n\nI know it is ugly and tricky, but we can't do differently on Windows :(\n\nTo get all created networks:\n\n```bash\nib object -n network get\n```\n\nUpdate a network:\n\n```bash\nib object -n network update -o network/ZG5zLm5ldHdvcmskMTAuMS4wLjAvMTYvMA:10.1.0.0%2F16 -a '{\"comment\":\"just a comment\"}'\n```\n\nSearch for a network:\n\n```bash\nib object -n network get -p '{\"comment~\":\"just\"}' --return-fields=network,networkview,comment\n```\n\nDelete a network:\n\n```bash\nib object -n network delete -o network/ZG5zLm5ldHdvcmskMTAuMS4wLjAvMTYvMA:10.1.0.0%2F16\n```\n\n# Warnings\n\n- The client was created by working on major version 2 of the infoblox API, so it is sure to work on it, will not work\n on a previous major version and is not sure to work on a higher major version.\n- I don't have much time to test my client on an infoblox server, so it's likely there are some bugs. Feel free to suggest\npull requests. See the CONTRIBUTING.md file for more details. All contributions are welcome :)\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/lewoudar/ib_client", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "ib-client", "package_url": "https://pypi.org/project/ib-client/", "platform": "", "project_url": "https://pypi.org/project/ib-client/", "project_urls": { "Homepage": "https://github.com/lewoudar/ib_client" }, "release_url": "https://pypi.org/project/ib-client/0.1.3/", "requires_dist": [ "requests", "click", "pygments", "python-dotenv", "click-didyoumean", "click-completion" ], "requires_python": ">=3.6", "summary": "Infoblox client", "version": "0.1.3" }, "last_serial": 5860197, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3b006696fb05b68f8e826aa6e693f36e", "sha256": "b7d6bdb8ca775a13ba1212c90b9e0be5cde994f307619f4703d2101166bda6b9" }, "downloads": -1, "filename": "ib_client-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "3b006696fb05b68f8e826aa6e693f36e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 21798, "upload_time": "2019-03-25T21:12:13", "url": "https://files.pythonhosted.org/packages/f5/1d/a1e85588506be178ff11b2a0ca2ffef2517c6b25965f50b1dc5d9f834147/ib_client-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6d873c3f4593d34bf2058151587c1804", "sha256": "a24a6b75548f2efa213293f60010fc19c28cf62a09e9d79275c352105df6de81" }, "downloads": -1, "filename": "ib-client-0.1.0.tar.gz", "has_sig": false, "md5_digest": "6d873c3f4593d34bf2058151587c1804", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25711, "upload_time": "2019-03-25T21:12:16", "url": "https://files.pythonhosted.org/packages/6f/9c/1cc0ddcea169ab607e57131880605252afd74dcae9165b88df504c294fba/ib-client-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "d7d0d912cccc6b96c9d29e38f02d77ae", "sha256": "6901ce4a68808afd7f479188397bea6aebec961ea71013e3ba41d1211801fcf6" }, "downloads": -1, "filename": "ib_client-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d7d0d912cccc6b96c9d29e38f02d77ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 22015, "upload_time": "2019-03-25T22:51:58", "url": "https://files.pythonhosted.org/packages/5f/b8/28065636d33a8be4a00838703570d8fcf68f5f964fbc62fad8da6cc7c1be/ib_client-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "182f2b5e43f212b3449c9322f8836118", "sha256": "82a385e2422bf193e3ace47eb816ed54040f0bcb037a0546be820ba252785b1a" }, "downloads": -1, "filename": "ib-client-0.1.1.tar.gz", "has_sig": false, "md5_digest": "182f2b5e43f212b3449c9322f8836118", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 25978, "upload_time": "2019-03-25T22:51:59", "url": "https://files.pythonhosted.org/packages/59/57/7c9f33944b04f824ae5bbaa8337634999c3e5a90a6e0c382aac046bf238d/ib-client-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a4add2a1ee14e940267b197593d4d105", "sha256": "1bf834ae5ba9ad1fe3e97be966d6d5c35a7185ba6cc5b03e42db3e2ca6e2611c" }, "downloads": -1, "filename": "ib_client-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a4add2a1ee14e940267b197593d4d105", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 15213, "upload_time": "2019-04-13T17:10:04", "url": "https://files.pythonhosted.org/packages/c8/db/1973e6da470be44a4614a3ea38bb18750a01469ed05eb0e406f66fe4606e/ib_client-0.1.2-py3-none-any.whl" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "b43a177368373f44d6206c6f7eb95c71", "sha256": "f198816c9a376517977c84b717c0c2644746b44fa4dfcfd39ecb03d5575881fe" }, "downloads": -1, "filename": "ib_client-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b43a177368373f44d6206c6f7eb95c71", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 33420, "upload_time": "2019-09-20T05:11:13", "url": "https://files.pythonhosted.org/packages/4f/b7/61ae78e57bec02dc62c23f72bbfe6c4aab8fe369241f8de6ebaf7d527e95/ib_client-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2bf9427cbdf59a2a82b7b9dd39723bb", "sha256": "1146dd27f3d71aa16f03a4a28b13bd2ac95851a58f501ed03ce2055c8dd262dc" }, "downloads": -1, "filename": "ib-client-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e2bf9427cbdf59a2a82b7b9dd39723bb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 26054, "upload_time": "2019-09-20T05:11:16", "url": "https://files.pythonhosted.org/packages/b7/18/7f70d9ae70ad0e8b5d86f83ae123bda87347ed5c59cfdcb35345845174eb/ib-client-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b43a177368373f44d6206c6f7eb95c71", "sha256": "f198816c9a376517977c84b717c0c2644746b44fa4dfcfd39ecb03d5575881fe" }, "downloads": -1, "filename": "ib_client-0.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "b43a177368373f44d6206c6f7eb95c71", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 33420, "upload_time": "2019-09-20T05:11:13", "url": "https://files.pythonhosted.org/packages/4f/b7/61ae78e57bec02dc62c23f72bbfe6c4aab8fe369241f8de6ebaf7d527e95/ib_client-0.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e2bf9427cbdf59a2a82b7b9dd39723bb", "sha256": "1146dd27f3d71aa16f03a4a28b13bd2ac95851a58f501ed03ce2055c8dd262dc" }, "downloads": -1, "filename": "ib-client-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e2bf9427cbdf59a2a82b7b9dd39723bb", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 26054, "upload_time": "2019-09-20T05:11:16", "url": "https://files.pythonhosted.org/packages/b7/18/7f70d9ae70ad0e8b5d86f83ae123bda87347ed5c59cfdcb35345845174eb/ib-client-0.1.3.tar.gz" } ] }