Skip to content
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dmr.py

PyPI - Python Version PyPI PyPI - Downloads
You will no longer need an exspensive API for danish licens plate lookups with dmr.py, this tool scrapes motorregister.skat.dk directly and returns the data for you to use in your application.

Installation:

Install with pip

python -m pip install dmr.py

Install current code from this repo, you will need to have git installed in order to do this.

python -m pip install git+https://github.com/j4asper/dmr.py

Example

synchronously

from dmr import DMR

licens_plate = "cw87553"

# Get DMR object with data
vehicle = DMR().get_by_plate(licens_plate)

print("The vehicle make is:", vehicle.make)

Asynchronously

from dmr import DMR

licens_plate = "cw87553"

# Get DMR object with data
vehicle = await DMR().get_by_plate_async(licens_plate)

print("The vehicle make is:", vehicle.make)

All attributes to the DMR() object can be viewed in the Wiki

Contributing:

I would be more than happy if those who know how to make pull requests, contribute with code!

ToDo

  • Add from_json and to_json functions.
  • Add documentation with all possible values.
  • Scrape more parts of the DMR site to get even more data.
  • Add wider tests with different types of cars or bikes.

Issue we can't do anything about.

If you have used this tool, you might notice that it is slow AF. That is probably due to our government using multiple 80-100 GB XML files as the databse for all vehicles in Denmark. It roughly takes about 3 seconds to do a lookup on the DMR site.

About

Pull data directly from the danish vehicle registar with dmr.py

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages