{"id":17034358,"url":"https://github.com/vimalloc/easyzone","last_synced_at":"2025-04-24T05:04:53.025Z","repository":{"id":16954902,"uuid":"19717143","full_name":"vimalloc/easyzone","owner":"vimalloc","description":null,"archived":false,"fork":false,"pushed_at":"2016-06-14T19:36:28.000Z","size":48,"stargazers_count":3,"open_issues_count":1,"forks_count":3,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-24T05:03:32.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vimalloc.png","metadata":{"files":{"readme":"README.txt","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-05-12T22:06:55.000Z","updated_at":"2023-10-30T01:17:02.000Z","dependencies_parsed_at":"2022-09-08T02:02:26.477Z","dependency_job_id":null,"html_url":"https://github.com/vimalloc/easyzone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimalloc%2Feasyzone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimalloc%2Feasyzone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimalloc%2Feasyzone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimalloc%2Feasyzone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vimalloc","download_url":"https://codeload.github.com/vimalloc/easyzone/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250566457,"owners_count":21451231,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-14T08:43:24.149Z","updated_at":"2025-04-24T05:04:53.003Z","avatar_url":"https://github.com/vimalloc.png","language":"Python","readme":"Fork of easyzone from https://bitbucket.org/chrismiles/easyzone.\n\nIncludes AAAAA/SRV/PTR records from provnet here:\nhttps://bitbucket.org/chrismiles/easyzone/pull-request/1/add-include-option-to-clear_all_records/diff\n\nAlso fixes up Exception so they derive from an EasyZone Exception base class,\nand don't overwtire NameError\n\neasyzone\n========\n\nOverview\n--------\n\nEasyzone is a package to manage the common record types of a\nzone file, including SOA records.  This module sits on top of\nthe dnspython package and provides a higher level abstraction\nfor common zone file manipulation use cases.\n\nMain features:\n\n* A high-level abstraction on top of dnspython.\n* Load a zone file into objects.\n* Modify/add/delete zone/record objects.\n* Save back to zone file.\n* Auto-update serial (if necessary).\n\nhttp://www.psychofx.com/easyzone/\nhttp://pypi.python.org/pypi/easyzone\nhttps://bitbucket.org/chrismiles/easyzone/\n\n\nRequirements\n------------\n\n  * dnspython - http://www.dnspython.org/\n\n\nBuild/Test/Install\n------------------\n\nBuild::\n\n  $ python setup.py build\n\nTest::\n\n  $ python setup.py test\n\nInstall::\n\n  $ python setup.py install\n\n\nOR with setuptools::\n\n  $ easy_install easyzone\n\n\nExamples\n--------\n\neasyzone::\n\n  \u003e\u003e\u003e from easyzone import easyzone\n  \u003e\u003e\u003e z = easyzone.zone_from_file('example.com', '/var/namedb/example.com')\n  \u003e\u003e\u003e z.domain\n  'example.com.'\n  \u003e\u003e\u003e z.root.soa.serial\n  2007012902L\n  \u003e\u003e\u003e z.root.records('NS').items\n  ['ns1.example.com.', 'ns2.example.com.']\n  \u003e\u003e\u003e z.root.records('MX').items\n  [(10, 'mail.example.com.'), (20, 'mail2.example.com.')]\n  \u003e\u003e\u003e z.names['foo.example.com.'].records('A').items\n  ['10.0.0.1']\n\n  \u003e\u003e\u003e ns = z.root.records('NS')\n  \u003e\u003e\u003e ns.add('ns3.example.com.')\n  \u003e\u003e\u003e ns.items\n  ['ns1.example.com.', 'ns2.example.com.', 'ns3.example.com.']\n  \u003e\u003e\u003e ns.delete('ns2.example.com')\n  \u003e\u003e\u003e ns.items\n  ['ns1.example.com.', 'ns3.example.com.']\n\n  \u003e\u003e\u003e z.save(autoserial=True)\n\nZoneCheck::\n\n  \u003e\u003e\u003e from easyzone.zone_check import ZoneCheck\n  \u003e\u003e\u003e c = ZoneCheck()\n  \u003e\u003e\u003e c.isValid('example.com', '/var/named/zones/example.com')\n  True\n  \u003e\u003e\u003e c.isValid('foo.com', '/var/named/zones/example.com')\n  False\n  \u003e\u003e\u003e c.error\n  'Bad syntax'\n  \u003e\u003e\u003e \n  \u003e\u003e\u003e c = ZoneCheck(checkzone='/usr/sbin/named-checkzone')\n  \u003e\u003e\u003e c.isValid('example.com', '/var/named/zones/example.com')\n  True\n  \u003e\u003e\u003e\n\nZoneReload::\n\n  \u003e\u003e\u003e from easyzone.zone_reload import ZoneReload\n  \u003e\u003e\u003e r = ZoneReload()\n  \u003e\u003e\u003e r.reload('example.com')\n  zone reload up-to-date\n  \u003e\u003e\u003e r.reload('foo.com')\n  rndc: 'reload' failed: not found\n  Traceback (most recent call last):\n    File \"\u003cstdin\u003e\", line 1, in \u003cmodule\u003e\n    File \"easyzone/zone_reload.py\", line 51, in reload\n      raise ZoneReloadError(\"rndc failed with return code %d\" % r)\n  easyzone.zone_reload.ZoneReloadError: rndc failed with return code 1\n  \u003e\u003e\u003e \n  \u003e\u003e\u003e r = ZoneReload(rndc='/usr/sbin/rndc')\n  \u003e\u003e\u003e r.reload('example.com')\n  zone reload up-to-date\n  \u003e\u003e\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimalloc%2Feasyzone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimalloc%2Feasyzone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimalloc%2Feasyzone/lists"}