Coder Social home page Coder Social logo

nanalytics-de / deutschland Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bundesapi/deutschland

0.0 0.0 0.0 63.23 MB

Die wichtigsten APIs Deutschlands in einem Python Paket.

License: Apache License 2.0

Python 99.92% Makefile 0.01% HTML 0.05% Batchfile 0.02%

deutschland's Introduction

PyPI version deutschland GitHub license

Lint Publish Python 🐍 distributions 📦 to PyPI and TestPyPI Run Python 🐍 tests

Deutschland

A python package that gives you easy access to the most valuable datasets of Germany.

Installation

pip install deutschland

Geographic data

Fetch information about streets, house numbers, building outlines, …

from deutschland import Geo
geo = Geo()
# top_right and bottom_left coordinates
data = geo.fetch([52.530116236589244, 13.426532801586827],
                 [52.50876180448243, 13.359631043007212])
print(data.keys())
# dict_keys(['Adresse', 'Barrierenlinie', 'Bauwerksflaeche', 'Bauwerkslinie', 'Bauwerkspunkt', 'Besondere_Flaeche', 'Besondere_Linie', 'Besonderer_Punkt', 'Gebaeudeflaeche', 'Gebaeudepunkt', 'Gewaesserflaeche', 'Gewaesserlinie', 'Grenze_Linie', 'Historischer_Punkt', 'Siedlungsflaeche', 'Vegetationslinie', 'Verkehrsflaeche', 'Verkehrslinie', 'Verkehrspunkt', 'Hintergrund'])

print(data["Adresse"][0])
# {'geometry': {'type': 'Point', 'coordinates': (13.422642946243286, 52.51500157651358)}, 'properties': {'postleitzahl': '10179', 'ort': 'Berlin', 'ortsteil': 'Mitte', 'strasse': 'Holzmarktstraße', 'hausnummer': '55'}, 'id': 0, 'type': 'Feature'}

Company Data

Bundesanzeiger

Get financial reports for all german companies that are reporting to Bundesanzeiger.

from deutschland import Bundesanzeiger
ba = Bundesanzeiger()
# search term
data = ba.get_reports("Deutsche Bahn AG")
# returns a dictionary with all reports found as fulltext reports
print(data.keys())
# dict_keys(['Jahresabschluss zum Geschäftsjahr vom 01.01.2020 bis zum 31.12.2020', 'Konzernabschluss zum Geschäftsjahr vom 01.01.2020 bis zum 31.12.2020\nErgänzung der Veröffentlichung vom 04.06.2021',

Big thanks to Nico Duldhardt and Friedrich Schöne, who supported this implementation with their machine learning model.

Handelsregister

Fetch general company information about any company in the Handelsregister.

from deutschland import Handelsregister
hr = Handelsregister()
# search by keywords, see documentation for all available params
hr.search(keywords="Deutsche Bahn Aktiengesellschaft")
print(hr)

Consumer Protection Data

Lebensmittelwarnung

Get current product warnings provided by the german federal portal lebensmittelwarnung.de.

from deutschland import Lebensmittelwarnung
lw = Lebensmittelwarnung()
# search by content type and region, see documetation for all available params
data = lw.get("lebensmittel", "berlin")
print(data)
# [{'id': 19601, 'guid': 'https://www.lebensmittelwarnung.de/bvl-lmw-de/detail/lebensmittel/19601', 'pubDate': 'Fri, 10 Feb 2017 12:28:45 +0000', 'imgSrc': 'https://www.lebensmittelwarnung.de/bvl-lmw-de/opensaga/attachment/979f8cd3-969e-4a6c-9a8e-4bdd61586cd4/data.jpg', 'title': 'Sidroga Bio Säuglings- und Kindertee', 'manufacturer': 'Lebensmittel', 'warning': 'Pyrrolizidinalkaloide', 'affectedStates': ['Baden-Württemberg', '...']}]

Federal Job Openings

NRW

VERENA

Get open substitute teaching positions in NRW from https://www.schulministerium.nrw.de/BiPo/Verena/angebote

from deutschland import Verena
v = Verena()
data = v.get()
print(data)
# a full example data can be found at deutschland/verena/example.md
# [{ "school_id": "99999", "desc": "Eine Schule\nSchule der Sekundarstufe II\ndes Landkreis Schuling\n9999 Schulingen", "replacement_job_title": "Lehrkraft", "subjects": [ "Fach 1", "Fach 2" ], "comments": "Bemerkung zur Stelle: Testbemerkung", "duration": "01.01.2021 - 01.01.2022", ...} ...]

Autobahn

Get data from the Autobahn.

from deutschland import autobahn
from deutschland.autobahn.api import default_api

from pprint import pprint

autobahn_api_instance = default_api.DefaultApi()

try:
    # Auflistung aller Autobahnen
    api_response = autobahn_api_instance.list_autobahnen()
    pprint(api_response)

    # Details zu einer Ladestation
    station_id = "RUxFQ1RSSUNfQ0hBUkdJTkdfU1RBVElPTl9fMTczMzM="  # str |
    api_response = autobahn_api_instance.get_charging_station(station_id)
    pprint(api_response)

except autobahn.ApiException as e:
    print("Exception when calling DefaultApi->get_charging_station: %s\n" % e)

For the detailed documentation of this API see here

Presseportal

For further information see: https://github.com/tcmetzger/pypresseportal

from deutschland.presseportal import PresseportalApi

presseportal = PresseportalApi("YOUR_KEY_HERE")

stories = presseportal.get_stories()

Auto-Generated API-Clients

bundesrat

For the detailed documentation of this API see here

bundestag

For the detailed documentation of this API see here

destatis

For the detailed documentation of this API see here

dwd

For the detailed documentation of this API see here

interpol

For the detailed documentation of this API see here

jobsuche

For the detailed documentation of this API see here

ladestationen

For the detailed documentation of this API see here

mudab

For the detailed documentation of this API see here

nina

For the detailed documentation of this API see here

polizei_brandenburg

For the detailed documentation of this API see here

risikogebiete

For the detailed documentation of this API see here

smard

For the detailed documentation of this API see here

strahlenschutz

For the detailed documentation of this API see here

travelwarning

For the detailed documentation of this API see here

zoll

For the detailed documentation of this API see here

deutschland's People

Contributors

lilithwittmann avatar wirthual avatar lukaspanni avatar pjullrich avatar severinsimmler avatar auchtetraborat avatar jugmac00 avatar k0in avatar t-huyeng avatar devmarcstorm avatar aarondewes avatar asdil12 avatar zeitschlag avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.