Skip to content

Instantly share code, notes, and snippets.

@buzzkillb
Last active February 10, 2021 01:20
Show Gist options
  • Select an option

  • Save buzzkillb/5c45f35964ec28a8d2d6f49e00845fb2 to your computer and use it in GitHub Desktop.

Select an option

Save buzzkillb/5c45f35964ec28a8d2d6f49e00845fb2 to your computer and use it in GitHub Desktop.
#create new Denarius DDNS name based on name, value and expiration
from denariusrpc.authproxy import AuthServiceProxy, JSONRPCException
#DDNS to create data
ddns_create_name = 'api:python_example'
ddns_create_value = 'example value'
ddns_create_expiration = 9999
# rpc_user and rpc_password are set in the denarius.conf file
rpc_connection = AuthServiceProxy("http://%s:%[email protected]:32369"%("rpcusername", "rpcpassword"))
name_create = rpc_connection.name_new(ddns_create_name, ddns_create_value, ddns_create_expiration)
print(name_create)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment