Python Namesilo Module’s documentation!

Python Namesilo is API wrapper for Namesilo service. Currently we support fallowing operations:

  • registerDomain
  • renewDomain
  • checkRegisterAvailability
  • listDomains
  • getDomainInfo
  • contactList
  • contactAdd
  • getAccountBalance
  • addAccountFunds
  • getPrices

https://www.namesilo.com/Support/API-Manager

class namesilo.core.NameSilo(token, sandbox: bool = True)

Creating Namesilo object with given token

Parameters:
  • token – access token from namesilo.com
  • sandbox – true or false
add_account_funds(amount, payment_id)

Adding funds to Namesilo account

Parameters:
  • amount (float) – amount to add
  • payment_id (int) – ID of payment (credit card)
Returns:

Status and amount after adding funds, example: (True, 150.00)

Return type:

tuple

add_contact(contact)

Adding new contact for current account

Parameters:contact (ContactModel) –
Returns:Status for adding contact
Return type:bool
change_domain_nameservers(domain, primary_ns, secondary_ns)

Change name server for specified domain

Parameters:
  • domain (str) – Domain name
  • primary_ns (str) – Primary name Server
  • secondary_ns (str) – Secondary name server
Returns:

Status of action

Return type:

bool

check_domain(domain_name)

Check if domain name is available

Parameters:domain_name (str) – Domain name for checking
Returns:Availability of domain
Return type:bool
delete_contact(contact_id)

Delete contact from NameSilo account

Parameters:contact_id (int) – Contact ID
Returns:
Return type:None
get_account_balance()

Returns current account balance

Returns:current account balance
Return type:float
get_domain_info(domain_name)

Returns information about specified domain

Parameters:domain_name (str) – name of domain
Returns:domain information
Return type:DomainInfo
get_prices()

Returns all prices for supported TLDs

Returns:Prices for supported TLDs
Return type:dict
list_contacts()

Returns list of all contacts for current account

Returns:list of all contacts
Return type:list
list_domains()

List all domains registered with current account

Returns:list of registered domains
Return type:list
lock_domain(domain_name: str)
Parameters:domain_name (str) –
Returns:
register_domain(domain_name, years=1, auto_renew=0, private=0)

Register a new domain name

Parameters:
  • domain_name (str) – name of domain
  • years (int) – how long to register domain
  • auto_renew (int) – turn on or off auto-renewal option
  • private (int) – hide your private information (WHOIS)
Returns:

status of domain registration

Return type:

bool

renew_domain(domain_name, years=1)

Renew domain name

Parameters:
  • domain_name (str) – domain name for renewal
  • years (int) –
Returns:

status of renewal

Return type:

bool

unlock_domain(domain_name: str)
Parameters:domain_name (str) –
Returns:
update_contact(contact: namesilo.core.ContactModel)

Update existing contact with new information

Parameters:contact (ContactModel) – new contact information
Returns:status of action
Return type:bool

Indices and tables