Jump to content
Not connected, Your IP: 3.237.66.86
scubadude

AirPy - Python wrapper around AirVPN API

Recommended Posts

For anyone who likes programming with Python, I started a project called AirPy on Github, https://github.com/Delphae/AirVPN

 

AirPy is a Python wrapper around the AirVPN API which everybody can use, which some of you already heard of.

The API is very useful to determine your connection, your server connected to and your user info

Take a look at https://airvpn.org/api/ to learn more about the free to use API of AirVPN.

But the output is in JSON, XML and so on.

To use the output in a Python program, in a Python console or in Jupyter I have created the AirPy module.

 

I started it, just for fun. And to get familiar with Python and Object Oriented Programming (I learned programming the old school way: procedures and functions :-))

 

On Github you will find the AirPy code as well as an example, in Python, how to use the AirPy module.

 

 

Import the AirPy module with your personal API key and set the default country

from AirPy import Airvpn
APIKEY = "7de2aa122b7a42b9882d2f5b1e8ff30168ca6468"
air = Airvpn(APIKEY,'nl')  # when you are located in the Netherlands
air = Airvpn(APIKEY,'gb')  # when you are located in the UK, and so on

 

Examples  

 

print (air.user)
print (air.user.connected)
print (air.user.login)

print (air.connection)
print (air.connection.server_name)

print (air.sessions[0])

servers = air.servers()
for server in servers:
    print (server)

print (air.best())
print (air.rand())

 

So, if you think it is useful, use it. If you want to contribute, please do.

If you have suggestions and improvements, do not hesitate to write them in this post.

Share this post


Link to post

I've been wondering for three years whether the API will ever find its way into some software from a user. I considered it back when I played with the thought of coding my own Android client for AirVPN, along with an XMPP integration and a forums reader. An allrounder app for AirVPN access. Maybe it's not too late to start something yet.

 

Python is not my language, but if you ever need help with anything let me know. I'm interested where your little project could end.


» I am not an AirVPN team member. All opinions are my own and are not to be considered official. Only the AirVPN Staff account should be viewed as such.

» The forums is a place where you can ask questions to the community. You are not entitled to guaranteed answer times. Answer quality may vary, too. If you need professional support, please create tickets.

» If you're new, take some time to read LZ1's New User Guide to AirVPN. On questions, use the search function first. On errors, search for the error message instead.

» If you choose to create a new thread, keep in mind that we don't know your setup. Give info about it. Never forget the OpenVPN logs or, for Eddie, the support file (Logs > lifebelt icon).

» The community kindly asks you to not set up Tor exit relays when connected to AirVPN. Their IP addresses are subject to restrictions and these are relayed to all users of the affected servers.

 

» Furthermore, I propose that your paranoia is to be destroyed. If you overdo privacy, chances are you will be unique amond the mass again.

Share this post


Link to post

Is this repository still alive? The link above returns 404. Imho, Airvpn is missing an up-to-date API. The current one doesn't even include data for the ipv6 servers for example. Given that Eddie can pull these information, it's quite disappointing. For my own little app Qomui I had to reverse engineer the way Eddie actually does this. To anyone interested, have a look at my repository and feel free to ask any question.

Share this post


Link to post

Is this repository still alive? The link above returns 404. Imho, Airvpn is missing an up-to-date API. The current one doesn't even include data for the ipv6 servers for example. Given that Eddie can pull these information, it's quite disappointing. For my own little app Qomui I had to reverse engineer the way Eddie actually does this. To anyone interested, have a look at my repository and feel free to ask any question.

 

Thanks for your observation Corrado

I have moved my repositories within github. It is located at https://github.com/Delphae/AirVPN now

Share this post


Link to post

I don't see any more progress here. :( Anything planned in the future? @scubadude


» I am not an AirVPN team member. All opinions are my own and are not to be considered official. Only the AirVPN Staff account should be viewed as such.

» The forums is a place where you can ask questions to the community. You are not entitled to guaranteed answer times. Answer quality may vary, too. If you need professional support, please create tickets.

» If you're new, take some time to read LZ1's New User Guide to AirVPN. On questions, use the search function first. On errors, search for the error message instead.

» If you choose to create a new thread, keep in mind that we don't know your setup. Give info about it. Never forget the OpenVPN logs or, for Eddie, the support file (Logs > lifebelt icon).

» The community kindly asks you to not set up Tor exit relays when connected to AirVPN. Their IP addresses are subject to restrictions and these are relayed to all users of the affected servers.

 

» Furthermore, I propose that your paranoia is to be destroyed. If you overdo privacy, chances are you will be unique amond the mass again.

Share this post


Link to post
Guest
This topic is now closed to further replies.

×
×
  • Create New...