GithubHelp home page GithubHelp logo

python-powerdns's People

Contributors

991jo avatar outini avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

python-powerdns's Issues

Getting single zone

for zone in self.zones:

Shouldn't this method have some kind of flag to skip caching "all zones" if not desired?
I can understand benefit of this caching in small environment, however in huge setup it wouldn't likely complete, or, would cause huge impact on PDNS/DB when trying to fetch lets say million zones. (when you actually need 1 )

`UnicodeDecode error`on Windows install via pip

Whe installieng your package on Windows I get:

pip install python-powerdns                  
Collecting python-powerdns
  Using cached python-powerdns-2.1.0.tar.gz (14 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\mroose\AppData\Local\Temp\pip-install-9lebja68\python-powerdns_acda99872ed242afb6c7bfa0fc067fd1\setup.py", line 36, in <module>
          long_description=open(readme_file).read(),
        File "C:\Python39\lib\encodings\cp1252.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x9d in position 5076: character maps to <undefined>
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

This is possibly caused by the statement:

long_description=open(readme_file).read(),

which should maybe changed to:

long_description=open(readme_file, 'r', encoding='UTF-8').read(),

As there are more open statements in setup.py the may get changed, too.

Support comments for RRSets

PowerDNS supports comments on RRSets, but python-powerdns does not. It is simply not available in the RRSet constructor.

This should only be a small change to the RRSet Constructor because currently you can hack it in this way:

rrset = powerdns.RRSet(name="dummy", rtype="AAAA", records=["2001:db8::42"])
rrset["comments"] = [{"account": "test", "modifized_at":1622463776, "content": "yolo"}]
my_zone.create_records([rrset])

This is not very nice to use.
A solution would be to expand the RRSet constructor to allow comments and extend the __str__ and __repr__ methods.

I will prepare a Pull Request for that.

Comments in the PowerDNS Docs: https://doc.powerdns.com/md/httpapi/api_spec/#zone95collection

Project is using legacy setup method

When installing using pip, this warning is being showed: DEPRECATION: python-powerdns is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change.

Availability on pypi.org

Since the original vente-privée repository no longer exists, will this repository be made available on pypi for python-powerdns module?

PDNSServer string representation

I need to allow users to list and request the server_id by string.

When attempting to cast PDNSServer object to a string, it is composed of the <class name>:<server_id>.

Is there any particular reason why casting to string doesn't return just the server_id?

Delete ignores the data field, if more than one record of a given type exists

If you want to to delete one record where more than one entry of this type exists, all entries of the same type are deleted no matter what data you specify in the RRSet.

Tested with TLSA

zone.delete_record([
  powerdns.RRSET('_Blah.example.org.', 'TLSA', [('3 1 1 expired key')])
])

Deletes all TLSA records for a given name not only the expired one.
In my opinion this is a bug, do you agree?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.