Python wrapper around certbot(-auto) 0.10.0


#1

I’d like to announce a (working) proof of concept Python wrapper around the certbot (and certbot-auto, of course) command line tool.

Its target audience would be those creating products in a SaaS business environment, where you need to generate certificates for your customers’ CNAMEd domains they add to your product/system.


https://pypi.python.org/pypi/certbot-py

As the docs say, feedback is appreciated.


#2

I wonder if it’s possible to implement the same API inside the Certbot code itself instead of shelling out to it (since Certbot itself is written in Python). It seems like that would ultimately be more reliable if it can be made to work, and might be useful to a range of people who want an ACME client library in Python. But I also think there are other existing Python libraries in some form that some of those people may find useful for that purpose.


Internal Python Client
#3

As I mention in the certbot_py documentation, this is what I would like to see, assuming we’re talking about the same thing.

I simply wanted an easy way to generate certificates in my Python projects with an authorization hook/callback. This felt like the most future friendly way to accomplish this goal - at the moment.

What I would very much like to do instead is:

from certbot import client

def domain_validate_callback(domain, validation, token):
    # save in a database to be handled during 
    # a webrequest for the `.well-known/...` URL

results = client.generate_certificate(domain_list, save_http_auth_challenge_data, ...)

Obviously untested thought experiment - but this seems intuitive to me. In short, if the above was possible, I’d happily wipe traces of certbot_py from Github.

I’m not sure why certbot itself isn’t a library and a command line tool.


#4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.