README
This repository wraps the cloudfloordns API into a python library. The set of features supported is limited to our current usage and may grow accordingly to our needs.
Documentation
Documentation can be found here It is automatically generated using pdoc
Features
All features can be accessed through the Client class:
- Generic get/post/patch/delete methods that handle the result errors
- records: all CRUD operations +
.is_same(...)method to compare 2 records (see limitations) - domains: list all domains
NOTE: All objects (records/domains/...) are validated and wrapped inside a python class for convenience.
from cloudfloordns import Client, Record, Domain
client = Client()
domains = client.domains.list()
mydomain = domains[0]
my_record = Record(...)
client.records.create(mydomain, my_record)
client.records.list(mydomain)
Known Limitations
-
The API is really old and still use Swagger v1 (Swagger v2 has been out since 2014-09-08)
-
Authentication parameters are passed in the body.
- This is considered unsafe since the body can easily be logged (same for the url). The credentials should have been passed in HTTP headers.
- The standard does not allow to send a body with a GET method, some libraries may therefore not send the body.
-
The online documentation contains wrong/incomplete informations
- Wrong types (e.g. IDs are said to be of type
intwhen they arestr). - Required parameters are not explicited
- Create operation (POST method) acts silently as an Update operation (PATCH method) on conflict instead of throwing an error.
The current result is obtained through manual experimentation
- Wrong types (e.g. IDs are said to be of type
-
The Create/Update/Delete operations don't return any information about the remote data (e.g. New state, including the generated ID) => The only workaround to retrieve the changes is to make a request
-
The API doesn't provide a way to retrieve a single object (domain/record/...) by its ID. The only way is to ask for all objects and filter them based on unique groupe of attributes. This limitation force us to provide a comparison method
.is_same(...)to be able to check the remote objects and identify the corresponding one.client = Client() my_record = Record(...) client.records.create("mydomain.com", my_record) remote_records = client.records.list("mydomain.com") created_record = next((r for r in remote_records if my_record.is_same(r)), None)
This consume a lot more bandwidth than required (hopefully, the server response is fast enough). The results should be cached as much as possible
Run the project:
- Enter your virtual environment doing
poetry shell(only need to do that once in the terminal) - Run the project
python cloudfloordns
Develop
- Add a library using
poetry add mypackage(same as you would do withpip install mypackage) - Edit only the sources in
cloudfloordns/ - Check our online documentation for useful libraries.
Metadata
Release files for cloudfloordns 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cloudfloordns-0.1.8.tar.gz | 17.8 kB | Without provenance | Details for cloudfloordns-0.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cloudfloordns-0.1.8-py3-none-any.whl | Python 3 | none | any | Details for cloudfloordns-0.1.8-py3-none-any.whl |
Total release size: 39.5 kB
Release files / cloudfloordns-0.1.8.tar.gz
| Download URL | cloudfloordns-0.1.8.tar.gz |
|---|---|
| Size | 17.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08a8d1d67adc3d32b6bc4012ad652f8a9a4811c014caa74713254f493a8b0ac8
|
|
BLAKE2b-256 checksum How to use checksums |
65f71d8ea24c8ce4f14ae2f64a899a8f3316c8f2b77add260ab93d6737d9ce9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Release files / cloudfloordns-0.1.8-py3-none-any.whl
| Download URL | cloudfloordns-0.1.8-py3-none-any.whl |
|---|---|
| Size | 21.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ba1ad051d50585c03d6fa6336c4ef4adb501e52e47eb33239ae6069856d114b4
|
|
BLAKE2b-256 checksum How to use checksums |
2786393533f9ac8500fddaed175d3e1913b3474fe490d05c08afacb87fb84faf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.9.19
|
Security for cloudfloordns 0.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.