Skip to content

BergLucas/Python-Windscribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Python-Windscribe

Intro

I had purchased a lifetime subscription to Windscribe a few years ago and recently noticed that they had released a CLI. Being interested in web crawling, I threw together this basic CLI wrapper in an afternoon to use on some of my personal projects. I plan on making updates soon to cover more of the CLI.

NOTE: I am in no way affiliated with Windscribe.

Install

$ pip install python-windscribe

or

$ python setup.py install

Usage

Login

Login by explicitly providing your username & password or export environment variables WINDSCRIBE_USER and WINDSCRIBE_PW.

import windscribe

windscribe.login('<user>', '<password>')

Logout

Logout from the Windscribe CLI.

windscribe.logout()

Get locations

Returns a list of WindscribeLocation instances; each of which have the following attributes: name, abbrev, city, and label.

location_list = windscribe.locations()

Connect

Connects to the best server by default.

windscribe.connect()

NOTE: Calling connect multiple times will just cause the VPN to reconnect to the specified location.

Connect to a random location:

windscribe.random_connect()

Connect to a specific location using a string:

NOTE: You can use a given location's name, abbrev, city, label or pro.

windscribe.connect('BBQ')

Connect by passing in a WindscribeLocation instance:

def get_barbecue():

    for location in windscribe.locations():

        if location.label == 'BBQ': return location

bbq = get_barbecue()

windscribe.connect(bbq)

Disconnect

Disconnect from the Windscribe server.

windscribe.disconnect()

Account Details

Returns a WindscribeAccount instance which has the following attributes: username, current_usage, current_usage_unit, max_usage, max_usage_unit, and plan.

windscribe.account()

Version

Gets the version of the Windscribe CLI.

windscribe.version()

Status

Returns a WindscribeStatus instance which has the following attributes: pid, status, uptime, cpu_usage, mem_usage, ip, and connected.

windscribe.status()

About

Python Windscribe CLI Wrapper

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages