Sewer is a programmatic Lets Encrypt(ACME) client
Project description
## Sewer
Sewer is a Let's Encrypt(ACME) client.
It allows you to obtain ssl/tls certificates from Let's Encrypt.
Sewer currently only supports the DNS mode of validation. The only currently supported DNS provider is cloudflare but I will add more as time progresses.
## Usage:
```python
import sewer
# 1. to create a new certificate:
client = sewer.Client(domain_name='example.com',
CLOUDFLARE_DNS_ZONE_ID='random',
CLOUDFLARE_EMAIL='example@example.com',
CLOUDFLARE_API_KEY='nsa-grade-api-key')
certificate = client.cert()
certificate_key = client.certificate_key
account_key = client.account_key
print "your certicate is:", certificate
print "your certificate's key is:", certificate_key
print "\n\n"
print "you can write them to a file then add that file to your favourite webserver."
with open('certificate.crt', 'w') as certificate_file:
certificate_file.write(certificate)
with open('certificate.key', 'w') as certificate_key_file:
certificate_key_file.write(certificate_key)
print "your account key is:", account_key
print "IMPORTANT: keep your account key in a very safe and secure place."
with open('account_key.key', 'w') as account_key_file:
account_key_file.write(account_key)
# 2. to renew a certificate:
import sewer
with open('account_key.key', 'r') as account_key_file:
account_key = account_key_file.read()
client = sewer.Client(domain_name='example.com',
CLOUDFLARE_DNS_ZONE_ID='random',
CLOUDFLARE_EMAIL='example@example.com',
CLOUDFLARE_API_KEY='nsa-grade-api-key',
account_key=account_key)
certificate = client.renew()
certificate_key = client.certificate_key
with open('certificate.crt', 'w') as certificate_file:
certificate_file.write(certificate)
with open('certificate.key', 'w') as certificate_key_file:
certificate_key_file.write(certificate_key)
```
## TODO:
- make it DNS provider agnostic
- support more DNS providers
- add robust tests
- be able to handle SAN(subject alternative names)
## FAQ:
- Why another ACME client?
I wanted an ACME client that I could use to programmatically(as a library) acquire/get certificates. However I could not
find anything satisfactory for use in Python code.
- Why is it called Sewer?
Because, for the longest time now, getting certificates has felt like wading through sewers. That was before Let's Encrypt showed up.
Also, I really like the Kenyan hip hop artiste going by the name of Kitu Sewer.
Sewer is a Let's Encrypt(ACME) client.
It allows you to obtain ssl/tls certificates from Let's Encrypt.
Sewer currently only supports the DNS mode of validation. The only currently supported DNS provider is cloudflare but I will add more as time progresses.
## Usage:
```python
import sewer
# 1. to create a new certificate:
client = sewer.Client(domain_name='example.com',
CLOUDFLARE_DNS_ZONE_ID='random',
CLOUDFLARE_EMAIL='example@example.com',
CLOUDFLARE_API_KEY='nsa-grade-api-key')
certificate = client.cert()
certificate_key = client.certificate_key
account_key = client.account_key
print "your certicate is:", certificate
print "your certificate's key is:", certificate_key
print "\n\n"
print "you can write them to a file then add that file to your favourite webserver."
with open('certificate.crt', 'w') as certificate_file:
certificate_file.write(certificate)
with open('certificate.key', 'w') as certificate_key_file:
certificate_key_file.write(certificate_key)
print "your account key is:", account_key
print "IMPORTANT: keep your account key in a very safe and secure place."
with open('account_key.key', 'w') as account_key_file:
account_key_file.write(account_key)
# 2. to renew a certificate:
import sewer
with open('account_key.key', 'r') as account_key_file:
account_key = account_key_file.read()
client = sewer.Client(domain_name='example.com',
CLOUDFLARE_DNS_ZONE_ID='random',
CLOUDFLARE_EMAIL='example@example.com',
CLOUDFLARE_API_KEY='nsa-grade-api-key',
account_key=account_key)
certificate = client.renew()
certificate_key = client.certificate_key
with open('certificate.crt', 'w') as certificate_file:
certificate_file.write(certificate)
with open('certificate.key', 'w') as certificate_key_file:
certificate_key_file.write(certificate_key)
```
## TODO:
- make it DNS provider agnostic
- support more DNS providers
- add robust tests
- be able to handle SAN(subject alternative names)
## FAQ:
- Why another ACME client?
I wanted an ACME client that I could use to programmatically(as a library) acquire/get certificates. However I could not
find anything satisfactory for use in Python code.
- Why is it called Sewer?
Because, for the longest time now, getting certificates has felt like wading through sewers. That was before Let's Encrypt showed up.
Also, I really like the Kenyan hip hop artiste going by the name of Kitu Sewer.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sewer-0.0.1.tar.gz
(6.9 kB
view details)
Built Distribution
sewer-0.0.1-py2-none-any.whl
(8.0 kB
view details)
File details
Details for the file sewer-0.0.1.tar.gz
.
File metadata
- Download URL: sewer-0.0.1.tar.gz
- Upload date:
- Size: 6.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b44303fa1d8b739da810d868d85dbc543f72adf716fc85cf8c5f1a23fbfbe2af |
|
MD5 | 114019aec9659ee18a356761e5c8ec09 |
|
BLAKE2b-256 | 4c053ee61d67c785c7c1354b9c8bf5cb2beccbd5721cc80d9d450d85bef880ac |
File details
Details for the file sewer-0.0.1-py2-none-any.whl
.
File metadata
- Download URL: sewer-0.0.1-py2-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a934990d6f9a5ef5184557fc876f7382e1c0fe57e14e20279fa64fd2acb15a63 |
|
MD5 | 7dea056949fb01473ffe1ae5bdbd21e6 |
|
BLAKE2b-256 | 78dc4210adeb8b183bf8fc998e002c942edbc519c6e9206828a2bd8b93af0e50 |