Skip to content

bootisverycool/mullvad-python-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Mullvad Python Wrapper

A small unofficial Python wrapper for basic Mullvad account actions.

It currently supports:

  • Creating a new Mullvad account
  • Logging in with an account number
  • Getting the account expiration date
  • Fetching Mullvad pricing
  • Generating a crypto payment quote for adding time

Note: it does NOT support Bitcoin Lightning for quote generation.

Features

  • Simple class-based interface
  • Supports multiple payment coins in add_balance()
  • Lightweight and easy to integrate into scripts
  • Good starting point for automation projects

Installation

git clone https://github.com/bootisverycool/mullvad-python-wrapper.git
cd mullvad-python-wrapper
pip install requests beautifulsoup4

Example Usage

from mullvad import Mullvad

# Create a new account
account_number = Mullvad.create_account()
print("New account:", account_number)

# Log into an existing account
client = Mullvad(account_number)

# Check balance / expiration date
print("Expires:", client.check_balance())

# Get pricing
print("Pricing:", Mullvad.get_pricing())

# Generate a Bitcoin payment quote for 1 month
quote = client.add_balance(months=1, coin="bitcoin") # coin also accepts "bitcoincash" and "monero"
print("Address:", quote.address)
print("Amount:", quote.amount)

Disclaimer

This project is unofficial and is not affiliated with Mullvad.

It works by interacting with Mullvad's website endpoints, so it may break if Mullvad changes their site or request/response format.

About

A small unofficial wrapper for basic Mullvad account actions.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages