Simple ArvanCloud API for python based on ArvanCloud API
pip install --upgrade git+https://github.com/mheidari98/arvanApi.git
pip uninstall arvanapi
There are two ways of using this package. The easy way is to use the arvan
script, which allows you to manage your domains and DNS records from the command line. The other way is to use the Arvan
class in your python code.
A quick example:
# Arvan cli CDN Manager
arvan
You can also use it programmatically, like this:
from arvanApi import Arvan
api_key = 'dfbeaaf2-a653-47f7-ad42-caf052d4a2b0' # this is fake UUID, put your api key here
arv = Arvan(api_key, debug=False)
domain = "myDomain.com"
arv.createDomain(domain)
myDomain = arv.getDomain(domain)
myDomain.changeSsl(ssl_status=True)
ipAddr = '127.0.0.1' # this is fake ip address, put your server ip address here
dirId = myDomain.createDnsARecord('dir', ipAddr, cloud=False)
cdnId = myDomain.createDnsARecord('cdn', ipAddr, port=80, cloud=True, upstream_https='http')
for key, dns in myDomain.DNSs.items():
print(dns)
- create Domain
- get Domain
- delete Domain
- create DNS Record
- get DNS Record
- delete DNS Record
- get SSL status
- change SSL status
Project is: in progress
Created by @mheidari98
If you like this project, please consider supporting it by donating to the following bitcoin address: