rrpproxypy reference¶
Client¶
-
class
rrpproxypy.client.
RRPproxy
(username, password, test=False)¶ Bases:
object
-
convert_currency
(amount, from_, to)¶ Convert an amount in a certain currency.
Convert between two currencies.
Parameters: - amount (Decimal) – The amount to convert.
- from (str) – The currency from which to convert.
- to (str) – The currency to which to convert.
Returns: The response.
Return type: dict
-
domain_price
(domain, **params)¶ Get the price for an action on a domain.
Parameters: - domain (str) – The domain name.
- **params – Additional params.
Returns: The response.
Return type: dict
Raises: Failure
– When the request has failed.Note
See the wiki for more info: https://wiki.rrpproxy.net/api/api-command/DomainPrice
-
get_zone_info
(zone, **params)¶ Get information about a zone (TLD).
Parameters: - zone (str) – The zone to query.
- **params – Additional params.
Returns: The response.
Return type: dict
Note
See the wiki for more info: https://wiki.rrpproxy.net/api/api-command/GetZoneInfo
-
query_domain_list
()¶ Query a list of domains.
Returns: A list of domains.
-
query_exchange_rates
()¶ Query the exchange rates.
Returns: The response. Return type: dict
-
request
(command, **args)¶ Perform a request.
Parameters: command (str) – The API command to call. Keyword Arguments: arguments to the API call. (Additional) – Returns: The parsed response.
-
status_domain
(domain)¶ Request the domain status.
Parameters: domain (str) – The domain name to request the status for. Returns: The domain. Return type: dict
-
-
rrpproxypy.client.
try_parse
(value)¶ Try to parse the given value.
Parameters: value (str) – The value to parse. Returns: The parsed value.
Helpers¶
-
rrpproxypy.args.
add_arguments
(parser, default_username=None, default_password=None)¶ Add RRP arguments to an argument parser.
Command line arguments are added for the RRP username (–rrpproxy-username) and password (–rrpproxy-password). Both default to environment variables (RRPPROXY_USERNAME and RRPPROXY_PASSWORD). Another default can be supplied which serves as a fallback for the environment variables.
Parameters: parser (ArgumentParser) – The parser to add the arguments to.
Keyword Arguments: - default_username (str) – The default RRP username.
- default_password (str) – The default RRP password.