Skip to content

mheidari98/arvanApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

arvanApi

General info

Simple ArvanCloud API for python based on ArvanCloud API

Requirements

Installation

pip install --upgrade git+https://github.com/mheidari98/arvanApi.git

Uninstall

pip uninstall arvanapi

Usage

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)

Methods

  • create Domain
  • get Domain
  • delete Domain
  • create DNS Record
  • get DNS Record
  • delete DNS Record
  • get SSL status
  • change SSL status

Status

Project is: in progress

License

MIT

Contact

Created by @mheidari98

Support

If you like this project, please consider supporting it by donating to the following bitcoin address:

About

Simple ArvanCloud API for python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published