This project provides a Python wrapper for the Internet.bs API, allowing easy interaction with various domain management functionalities.
- Account management
- Domain operations
- DNS record management
- URL and Email forwarding
- Host management
To install the package, use pip:
pip install internetbs-api
First, import the necessary classes:
from internetbs import Account, Domain, DNS, Forwarding, Host
Then, initialize the API with your credentials:
api_key = 'your_api_key'
password = 'your_password'
test_mode = False # Set to True for testing
account = Account(api_key, password, test_mode)
domain = Domain(api_key, password, test_mode)
dns = DNS(api_key, password, test_mode)
forwarding = Forwarding(api_key, password, test_mode)
host = Host(api_key, password, test_mode)
result = domain.check_availability('example.com')
print(result)
result = dns.add_record('example.com', 'A', '192.168.1.1')
print(result)
result = forwarding.add_url_forward('example.com', 'https://destination.com')
print(result)
result = host.create_host('ns1.example.com', '192.168.1.1')
print(result)
For detailed documentation on all available methods and their parameters, please refer to the inline comments in the source code.
Contributions are welcome! Please feel free to submit a Pull Request.
If specific functions do not work, do not hesitate to open an issue as I have not fully implemented all functions.