Skip to main content
RimuDNS
=======

[RimuHosting](http://rimuhosting.com) Python DNS tools

Documentation for the API can be found [here](https://rimuhosting.com/dns/dyndns.jsp)
and [here](https://zonomi.com/app/dns/dyndns.jsp) for RimuHosting and Zonomi respectively.

The RimuDNS class is a wrapper around the REST API calls.

Installation
------------
easy_install rimudns
or

pip install rimudns

Usage
-----

The API key can be generated and replaced in the RimuHosting control panel
from https://rimuhosting.com/cp/apikeys.jsp

Get started:
```python
#!/usr/bin/env python
from rimudns import RimuDNS
api_key = 'GETYOURAPIKEYFROMTHECONTROLPANEL'
dns = RimuDNS(api_key)
dns.use_rimuhosting()
```

List all domains:
```python
for domain in dns.list_zones():
print domain['name']
```

Create a new domain:
```python
dns.create_zone('example.com')
```

Delete a domain:
```python
dns.delete_zone('example.com')
```
Import a domain from a BIND zone file or string::
* IMPORT_AXFR = 1
* IMPORT_FILE = 2
* IMPORT_TEXT = 3
* IMPORT_DICT = 4
* IMPORT_GUESS = 5

_for more information about *IMPORT_GUESS* see [Guessing Feature] below._

```python
from rimudns import ZoneHandle
dns.import_zone('example.com', ZoneHandle.IMPORT_FILE, '/tmp/example.com.zone')
```

Export a domain to file:
```python
dnsdns.to_file('/tmp/example.com.zone')
```
Delete a domain:
```python
dns.delete_zone('example.com')
```
List all records for a domain:
```python
records = dns.list_records('example.com')
for record_type in records:
print 'Type: ', record_type
for record in records[record_type]
print 'name: %s -> %s' % (record['name'], record['content')
```
Add/Update a record::
```python
dns.set_record('example.com', '127.0.0.1', record_type='A', ttl=600)
```
Delete a record::
```python
dns.delete_record('example.com', '127.0.0.1', 'A')
```
Change an IP across all zones::
```python
old_ip = '127.0.0.1'
new_ip = '127.0.0.2'
dns.change_ip(old_ip, new_ip)
```
Convert a zone to slave/back to regular::
```python
dns.convert_to_regular('example.com')
dns.convert_to_slave('example.com')
```

Web Interface
=============

You can always use the RimuHosting/Zonomi tools to edit your DNS zones
Try: https://rimuhosting.com/dns/

Guessing Feature
================
Most of the time you don't have access to AXFR or the Zone File to import the DNS zone directly.
The import_zone offers a _guessing_ feature that tries to build the zone information from DNS queries.
You can also provide extra guesses.
```python
extra_guesses = ['mail2', 'test', 'test1']
records = dns.import_zone('funinc.org', ZoneHandle.IMPORT_GUESS, param=extra_guesses, dryrun=True)
for record_type in records:
print 'Type: ', record_type
for record in records[record_type]
print 'name: %s -> %s' % (record['name'], record['content')
```

Metadata

Release files for RimuDNS 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for RimuDNS 0.0.4
File Size Uploaded
RimuDNS-0.0.4.tar.gz 8.4 kB Details

Release files / RimuDNS-0.0.4.tar.gz

Download URL RimuDNS-0.0.4.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c25897c833d2d3a5bf3fd87d49571d0207e1e7ecfc75d5fa75ee21ec10b84d9d
BLAKE2b-256 checksum
How to use checksums
839f6f4118567adee11b27a0438a832ecc6856a8ba05d4f8e6fedbba9ad0eecf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page