{ "info": { "author": "raynix", "author_email": "raynix@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Operating System :: OS Independent", "Programming Language :: Python :: 3.7" ], "description": "# lastapi\nThe Omni REST API Client\n\nThis is still WIP, but I've got prototype working which is for the update DNS function using CloudFlare API.\n\nThe project is written in Python 3. You can install dependencies with\n```\npip3 install --user -r requirements.txt\n```\n\n## Walk-through\n\n### REST API schema\nThe schema is defined in [schemas/cloudflare.yaml](https://github.com/raynix/lastapi/blob/master/schemas/cloudflare.yaml)\n```\n---\nName: cloudflare\nBase:\n Protocol: https\n Host: api.cloudflare.com\nHeaders:\n X-Auth-Key: ${auth_key}\n X-Auth-Email: ${auth_email}\n Content-Type: application/json\n\nActions:\n update_dns:\n Path:\n - /client/v4/zones/\n - ${zone_id}\n - /dns_records/\n - ${dns_id}\n Method: PUT\n Payload:\n type: ${dns_type}\n name: ${dns_name}\n content: ${dns_content}\n ttl: 1\n proxied: true\n```\nThis will be verified against [schemas/schema.yaml](https://github.com/raynix/lastapi/blob/master/schemas/schema.yaml) using pykwalify.\n\n### Global parameters\nGlobal parameters for the API, usually API key and account stuff, are in [schemas/cloudflare-params.yaml.example](https://github.com/raynix/lastapi/blob/master/schemas/cloudflare-params.yaml.example). You should duplicate it and remove the `.example` suffix and put in real credential.\n```\n---\nauth_key: sample-api-key\nauth_email: raynix@some.email\n```\n\n### Invoking an Action in the schema\nTo invoke the `update_dns` action defined in the schema, run:\n```\n./lapi --schema schemas/cloudflare --func update_dns --vars zone_id=xxx,dns_id=xxx,dns_type=A,dns_name=mydomain.com,dns_content=1.2.3.4\n```\n\nPlease comment or raise an issue if this doesn't work for you.\n\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/raynix/lastapi", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "lastapi", "package_url": "https://pypi.org/project/lastapi/", "platform": "", "project_url": "https://pypi.org/project/lastapi/", "project_urls": { "Homepage": "https://github.com/raynix/lastapi" }, "release_url": "https://pypi.org/project/lastapi/0.2/", "requires_dist": null, "requires_python": "", "summary": "REST API defined as YAML and invoked with lastapi.", "version": "0.2" }, "last_serial": 5538335, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "b9abdf156f128994852b2b220bbab558", "sha256": "75056dc3241de7bae42117d6732bbd93315e3bda4978dc974bfc93fad4ca4a6c" }, "downloads": -1, "filename": "lastapi-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b9abdf156f128994852b2b220bbab558", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18029, "upload_time": "2019-07-16T04:22:07", "url": "https://files.pythonhosted.org/packages/db/05/ebb495423706bd6b94cb7538dce0f7857fef16246915807ccf733371b30a/lastapi-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "686c8fd16fafcfec8a57347d579cf8af", "sha256": "bac0383c30045e816649677033990ed6867b8ae439394d4057156b3a5e743957" }, "downloads": -1, "filename": "lastapi-0.2.tar.gz", "has_sig": false, "md5_digest": "686c8fd16fafcfec8a57347d579cf8af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4128, "upload_time": "2019-07-16T04:22:09", "url": "https://files.pythonhosted.org/packages/ae/3c/e9b2dff17d3e2ff3e1526ef6e80e22a4139d785797e6991636c42ea18518/lastapi-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b9abdf156f128994852b2b220bbab558", "sha256": "75056dc3241de7bae42117d6732bbd93315e3bda4978dc974bfc93fad4ca4a6c" }, "downloads": -1, "filename": "lastapi-0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "b9abdf156f128994852b2b220bbab558", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 18029, "upload_time": "2019-07-16T04:22:07", "url": "https://files.pythonhosted.org/packages/db/05/ebb495423706bd6b94cb7538dce0f7857fef16246915807ccf733371b30a/lastapi-0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "686c8fd16fafcfec8a57347d579cf8af", "sha256": "bac0383c30045e816649677033990ed6867b8ae439394d4057156b3a5e743957" }, "downloads": -1, "filename": "lastapi-0.2.tar.gz", "has_sig": false, "md5_digest": "686c8fd16fafcfec8a57347d579cf8af", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4128, "upload_time": "2019-07-16T04:22:09", "url": "https://files.pythonhosted.org/packages/ae/3c/e9b2dff17d3e2ff3e1526ef6e80e22a4139d785797e6991636c42ea18518/lastapi-0.2.tar.gz" } ] }