Skip to content
This repository was archived by the owner on May 3, 2024. It is now read-only.

Python script for programmatically getting a driver's license faster

License

Notifications You must be signed in to change notification settings

ekvanox/trafikverket-helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Trafikverket Helper

Version GitHub repo size CodeFactor License

This is a script for interacting with the Trafikverket API to retrieve information about available rides for driving examinations. It allows the user to select an examination type and execution mode, then retrieves available rides from the API and displays them in the console.

Usage example gif

Requirements

  • Python 3.7 or higher

Installation

Clone the repository and install the required packages:

$ git clone https://github.com/ekvanox/trafikverket-helper
$ cd trafikverket-helper
$ pip install -r requirements.txt

Usage

To run the script, use the following command:

$ python main.py

Modes

The script has three execution modes:

  • Sort by date: Retrieves the available rides from the API and sorts them by date and time, from earliest to latest.
  • Log server changes: Retrieves the available rides from the API and continuously logs any changes to the server data, such as new or removed rides.
  • Start web server: Starts a local web server to display the available rides in a web page.

Configuration

The script uses a config.json file for settings and authentication. The file should be located in the same directory as the script, and should have the following format:

{
  "swedish_ssn": "0123456-7890",
  "proxy": {
    "host": "localhost",
    "port": 8888,
    "protocol": "http"
  }
}

The swedish_ssn field should be replaced with a valid Swedish social security number, and the proxy field can be omitted or modified to use a proxy server for the API requests.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Python script for programmatically getting a driver's license faster

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages