Skip to content

Commit

Permalink
Merge 8479596 into 20c8043
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ authored Nov 12, 2019
2 parents 20c8043 + 8479596 commit e3473dd
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions examples/python_library_usage.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from lexicon.config import ConfigResolver
from lexicon.client import Client

lexicon_config = {
"provider_name" : "cloudflare", # lexicon shortname for provider, see providers directory for available proviers
"action": "list", # create, list, update, delete
"domain": "capsulecd.com", # domain name
"type": "CNAME", # specify a type for record filtering, case sensitive in some cases.
"cloudflare": {
# cloudflare(provider) specific configuration goes here.
# if .with_env() is not used, all credentials required for authention must be specified here.
}
}

config = ConfigResolver()
config.with_env().with_dict(dict_object=lexicon_config)
client = Client(config)
results = client.execute()
print results

0 comments on commit e3473dd

Please sign in to comment.