fb-pdnstools 1.0.2__tar.gz → 1.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. fb_pdnstools-1.1.0/PKG-INFO +53 -0
  2. fb_pdnstools-1.1.0/data/share/locale/de/LC_MESSAGES/fb_pdnstools.mo +0 -0
  3. fb_pdnstools-1.1.0/data/share/locale/en/LC_MESSAGES/fb_pdnstools.mo +0 -0
  4. fb_pdnstools-1.1.0/pyproject.toml +82 -0
  5. fb_pdnstools-1.1.0/src/fb_pdnstools/__init__.py +113 -0
  6. {fb_pdnstools-1.0.2/lib → fb_pdnstools-1.1.0/src}/fb_pdnstools/base_handler.py +119 -102
  7. {fb_pdnstools-1.0.2/lib → fb_pdnstools-1.1.0/src}/fb_pdnstools/bulk_rm_app.py +242 -152
  8. {fb_pdnstools-1.0.2/lib → fb_pdnstools-1.1.0/src}/fb_pdnstools/bulk_rm_cfg.py +33 -19
  9. {fb_pdnstools-1.0.2/lib → fb_pdnstools-1.1.0/src}/fb_pdnstools/common.py +13 -13
  10. {fb_pdnstools-1.0.2/lib → fb_pdnstools-1.1.0/src}/fb_pdnstools/errors.py +15 -15
  11. {fb_pdnstools-1.0.2/lib → fb_pdnstools-1.1.0/src}/fb_pdnstools/record.py +407 -241
  12. {fb_pdnstools-1.0.2/lib → fb_pdnstools-1.1.0/src}/fb_pdnstools/server.py +81 -44
  13. fb_pdnstools-1.1.0/src/fb_pdnstools/xlate.py +134 -0
  14. {fb_pdnstools-1.0.2/lib → fb_pdnstools-1.1.0/src}/fb_pdnstools/zone.py +600 -369
  15. fb_pdnstools-1.0.2/MANIFEST.in +0 -5
  16. fb_pdnstools-1.0.2/PKG-INFO +0 -40
  17. fb_pdnstools-1.0.2/bin/pdns-bulk-remove +0 -68
  18. fb_pdnstools-1.0.2/lib/fb_pdnstools/__init__.py +0 -71
  19. fb_pdnstools-1.0.2/lib/fb_pdnstools/local_version.py +0 -17
  20. fb_pdnstools-1.0.2/lib/fb_pdnstools/xlate.py +0 -113
  21. fb_pdnstools-1.0.2/lib/fb_pdnstools.egg-info/PKG-INFO +0 -40
  22. fb_pdnstools-1.0.2/lib/fb_pdnstools.egg-info/SOURCES.txt +0 -36
  23. fb_pdnstools-1.0.2/lib/fb_pdnstools.egg-info/dependency_links.txt +0 -1
  24. fb_pdnstools-1.0.2/lib/fb_pdnstools.egg-info/requires.txt +0 -5
  25. fb_pdnstools-1.0.2/lib/fb_pdnstools.egg-info/top_level.txt +0 -1
  26. fb_pdnstools-1.0.2/setup.cfg +0 -60
  27. fb_pdnstools-1.0.2/setup.py +0 -258
  28. fb_pdnstools-1.0.2/test/general.py +0 -235
  29. fb_pdnstools-1.0.2/test/rrset-a-with-comment.js +0 -18
  30. fb_pdnstools-1.0.2/test/rrset-a.js +0 -12
  31. fb_pdnstools-1.0.2/test/rrset-mx.js +0 -16
  32. fb_pdnstools-1.0.2/test/rrset-soa.js +0 -12
  33. fb_pdnstools-1.0.2/test/test_00_fb_pdnstools.py +0 -187
  34. fb_pdnstools-1.0.2/test/test_05_common.py +0 -152
  35. fb_pdnstools-1.0.2/test/test_10_base_handler.py +0 -121
  36. fb_pdnstools-1.0.2/test/test_20_record.py +0 -404
  37. fb_pdnstools-1.0.2/test/test_30_zone.py +0 -202
  38. fb_pdnstools-1.0.2/test/test_40_server.py +0 -176
  39. fb_pdnstools-1.0.2/test/zone-rev.js +0 -99
  40. fb_pdnstools-1.0.2/test/zone.js +0 -140
  41. fb_pdnstools-1.0.2/test/zones.js +0 -28
  42. {fb_pdnstools-1.0.2 → fb_pdnstools-1.1.0}/LICENSE +0 -0
  43. {fb_pdnstools-1.0.2 → fb_pdnstools-1.1.0}/README.md +0 -0
@@ -0,0 +1,53 @@
1
+ Metadata-Version: 2.4
2
+ Name: fb_pdnstools
3
+ Version: 1.1.0
4
+ Summary: @summary: The module for a base PowerDNS handler object.
5
+ Author-email: Frank Brehm <frank@brehm-online.com>
6
+ Requires-Python: >=3.8
7
+ Description-Content-Type: text/markdown
8
+ Classifier: Development Status :: 4 - Beta
9
+ Classifier: Environment :: Console
10
+ Classifier: Framework :: IPython
11
+ Classifier: Intended Audience :: Developers
12
+ Classifier: License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)
13
+ Classifier: Natural Language :: English
14
+ Classifier: Operating System :: POSIX
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ License-File: LICENSE
22
+ Requires-Dist: babel
23
+ Requires-Dist: chardet
24
+ Requires-Dist: fb_logging
25
+ Requires-Dist: fb_tools
26
+ Requires-Dist: pytz
27
+ Requires-Dist: PyYAML
28
+ Requires-Dist: requests
29
+ Requires-Dist: semver
30
+ Requires-Dist: six
31
+ Requires-Dist: black ; extra == "development"
32
+ Requires-Dist: isort ; extra == "development"
33
+ Requires-Dist: hjson ; extra == "development"
34
+ Requires-Dist: flake8 ; extra == "lint"
35
+ Requires-Dist: pylint ; extra == "lint"
36
+ Requires-Dist: flake8-blind-except ; extra == "lint"
37
+ Requires-Dist: flake8-builtins ; extra == "lint"
38
+ Requires-Dist: flake8-bugbear ; extra == "lint"
39
+ Requires-Dist: flake8-class-newline ; extra == "lint"
40
+ Requires-Dist: flake8-comprehensions ; extra == "lint"
41
+ Requires-Dist: flake8-deprecated ; extra == "lint"
42
+ Requires-Dist: flake8-docstrings ; extra == "lint"
43
+ Requires-Dist: flake8-import-order ; extra == "lint"
44
+ Requires-Dist: pytest >= 7.0.0, < 9.0.0 ; extra == "testing"
45
+ Requires-Dist: requests_mock ; extra == "testing"
46
+ Project-URL: Source, https://github.com/fbrehm/fb-pdnstools
47
+ Provides-Extra: development
48
+ Provides-Extra: lint
49
+ Provides-Extra: testing
50
+
51
+ # fb-pdnstools
52
+ Python module to handle with PowerDNS
53
+
@@ -0,0 +1,82 @@
1
+ [build-system]
2
+ requires = ["flit_core >=3.2,<4"]
3
+ build-backend = "flit_core.buildapi"
4
+
5
+ [project]
6
+ name = "fb_pdnstools"
7
+ authors = [{name = "Frank Brehm", email = "frank@brehm-online.com"}]
8
+ license = {file = "LICENSE"}
9
+ classifiers = [
10
+ "Development Status :: 4 - Beta",
11
+ "Environment :: Console",
12
+ "Framework :: IPython",
13
+ "Intended Audience :: Developers",
14
+ "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)",
15
+ "Natural Language :: English",
16
+ "Operating System :: POSIX",
17
+ "Programming Language :: Python :: 3.9",
18
+ "Programming Language :: Python :: 3.10",
19
+ "Programming Language :: Python :: 3.11",
20
+ "Programming Language :: Python :: 3.12",
21
+ "Programming Language :: Python :: 3.13",
22
+ "Topic :: Software Development :: Libraries :: Python Modules",
23
+ ]
24
+ dynamic = ["version", "description"]
25
+ readme = "README.md"
26
+ requires-python = ">=3.8"
27
+ dependencies = [
28
+ "babel",
29
+ "chardet",
30
+ "fb_logging",
31
+ "fb_tools",
32
+ "pytz",
33
+ "PyYAML",
34
+ "requests",
35
+ "semver",
36
+ "six",
37
+ ]
38
+
39
+ [project.urls]
40
+ Source = "https://github.com/fbrehm/fb-pdnstools"
41
+
42
+ [tool.flit.module]
43
+ name = "fb_pdnstools"
44
+
45
+ [tool.flit.external-data]
46
+ directory = "data"
47
+
48
+ [project.scripts]
49
+ pdns-bulk-remove = "fb_pdnstools.bulk_rm_app:main"
50
+
51
+ [project.optional-dependencies]
52
+ development = [
53
+ "black",
54
+ "isort",
55
+ "hjson",
56
+ ]
57
+
58
+ lint = [
59
+ "flake8",
60
+ "pylint",
61
+ "flake8-blind-except",
62
+ "flake8-builtins",
63
+ "flake8-bugbear",
64
+ "flake8-class-newline",
65
+ "flake8-comprehensions",
66
+ "flake8-deprecated",
67
+ "flake8-docstrings",
68
+ "flake8-import-order"
69
+ ]
70
+
71
+ testing = [
72
+ "pytest >= 7.0.0, < 9.0.0",
73
+ "requests_mock",
74
+ ]
75
+
76
+ [tool.black]
77
+ line-length = 99
78
+ target-version = ["py39", "py310", "py311", "py312"]
79
+
80
+
81
+ # =============================================================================
82
+ # vim: fileencoding=utf-8 filetype=toml tabstop=4 expandtab shiftwidth=4 softtabstop=4 list
@@ -0,0 +1,113 @@
1
+ #!/usr/bin/env python
2
+ # -*- coding: utf-8 -*-
3
+ """
4
+ @summary: The module for a base PowerDNS handler object.
5
+
6
+ @author: Frank Brehm
7
+ @contact: frank@brehm-online.com
8
+ @copyright: © 2024 Frank Brehm, Berlin
9
+ """
10
+ from __future__ import absolute_import
11
+
12
+ # Standard modules
13
+ import re
14
+
15
+ __version__ = "1.1.0"
16
+
17
+ # This library name will be used as a part of the user agent in HTTP(S) requests
18
+ LIBRARY_NAME = "fb-pdns-api-client"
19
+
20
+ VALID_RRSET_TYPES = [
21
+ "SOA",
22
+ "A",
23
+ "AAAA",
24
+ "AFSDB",
25
+ "APL",
26
+ "CAA",
27
+ "CDNSKEY",
28
+ "CDS",
29
+ "CERT",
30
+ "CNAME",
31
+ "DHCID",
32
+ "DLV",
33
+ "DNAME",
34
+ "DNSKEY",
35
+ "DS",
36
+ "HIP",
37
+ "HINFO",
38
+ "IPSECKEY",
39
+ "ISDN",
40
+ "KEY",
41
+ "KX",
42
+ "LOC",
43
+ "MB",
44
+ "MINFO",
45
+ "MX",
46
+ "NAPTR",
47
+ "NS",
48
+ "NSAP",
49
+ "NSEC",
50
+ "NSEC3",
51
+ "NSEC3PARAM",
52
+ "OPT",
53
+ "PTR",
54
+ "RP",
55
+ "RRSIG",
56
+ "SIG",
57
+ "SPF",
58
+ "SRV",
59
+ "SSHFP",
60
+ "TA",
61
+ "TKEY",
62
+ "TLSA",
63
+ "TSIG",
64
+ "TXT",
65
+ "URI",
66
+ "WKS",
67
+ "X25",
68
+ ]
69
+
70
+ DEFAULT_PORT = 8081
71
+ DEFAULT_TIMEOUT = 20
72
+ DEFAULT_API_PREFIX = "/api/v1"
73
+ DEFAULT_USE_HTTPS = False
74
+
75
+ MAX_PORT_NUMBER = (2**16) - 1
76
+
77
+ FQDN_REGEX = re.compile(r"^((?!-)[-A-Z\d]{1,62}(?<!-)\.)+[A-Z]{1,62}\.?$", re.IGNORECASE)
78
+
79
+
80
+ # Own modules
81
+ from .errors import PDNSApiError # noqa: F401
82
+ from .errors import PDNSApiNotAuthorizedError # noqa: F401
83
+ from .errors import PDNSApiNotFoundError # noqa: F401
84
+ from .errors import PDNSApiRateLimitExceededError # noqa: F401
85
+ from .errors import PDNSApiRequestError # noqa: F401
86
+ from .errors import PDNSApiTimeoutError # noqa: F401
87
+ from .errors import PDNSApiValidationError # noqa: F401
88
+ from .errors import PDNSNoRecordsToRemove # noqa: F401
89
+ from .errors import PowerDNSHandlerError # noqa: F401
90
+ from .errors import PowerDNSRecordError # noqa: F401
91
+ from .errors import PowerDNSRecordSetError # noqa: F401
92
+ from .errors import PowerDNSWrongRecordTypeError # noqa: F401
93
+ from .errors import PowerDNSWrongSoaDataError # noqa: F401
94
+ from .errors import PowerDNSZoneError # noqa: F401
95
+ from .record import PowerDNSRecord # noqa: F401
96
+ from .record import PowerDNSRecordList # noqa: F401
97
+ from .record import PowerDNSRecordSet # noqa: F401
98
+ from .record import PowerDNSRecordSetComment # noqa: F401
99
+ from .record import PowerDNSRecordSetList # noqa: F401
100
+ from .record import PowerDnsSOAData # noqa: F401
101
+ from .server import PowerDNSServer # noqa: F401
102
+ from .zone import PowerDNSZone # noqa: F401
103
+ from .zone import PowerDNSZoneDict # noqa: F401
104
+
105
+
106
+ # =============================================================================
107
+ if __name__ == "__main__":
108
+
109
+ pass
110
+
111
+ # =============================================================================
112
+
113
+ # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 list