[RFC] Semantic Conventions for OpenStreetMap™ 2023 - Python library example
Project description
wiki_as_base-py
[MVP] Use MediaWiki Wiki page content as read-only database. Python library implementation. See https://github.com/fititnt/openstreetmap-serverless-functions/tree/main/function/wiki-as-base
Installing
pip install wiki_as_base --upgrade
Usage
Environment variables
Customize for your needs. They're shared between command line and the library.
export WIKI_API='https://wiki.openstreetmap.org/w/api.php'
export WIKI_INFOBOXES='ValueDescription\nKeyDescription'
export WIKI_DATA_LANGS='yaml\nturtle'
Command line
wiki_as_base --help
# Select base page from the Wiki mentioned on WIKI_API
wiki_as_base --page-title 'User:EmericusPetro/sandbox/Wiki-as-base'
# The output is JSON-LD. Feel free to further filter the data
wiki_as_base --page-title 'User:EmericusPetro/sandbox/Wiki-as-base' | jq .data[0]
Library
Disclaimer / Trivia
The wiki_as_base allows no-as-complete data extraction from MediaWiki markup text directly by its API or direct input, without need to install server extensions.
Check also the wikimedia/Wikibase, a full server version (which inspired the name).
License
Public domain
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file wiki_as_base-0.2.0.tar.gz
.
File metadata
- Download URL: wiki_as_base-0.2.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.8.2 pkginfo/1.7.0 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89b6c33ff16cc13710ebd6b2371ca7da2800f55c44ca6095b27a5f900b21b7e4 |
|
MD5 | f0fdbc05ce2ec78881eb3695482b5290 |
|
BLAKE2b-256 | f46e3bbfa10cbfe2ce18972b5524b410015cbe18092583f444f37698c938b9a6 |
File details
Details for the file wiki_as_base-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: wiki_as_base-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.8.2 pkginfo/1.7.0 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c62142ca8ab2a80925dd2cb32bec1a586fac21b871edf3d6faa6cf526f135d6 |
|
MD5 | da33e31f4cac1dbb56c3973c2ac2d5c5 |
|
BLAKE2b-256 | 487ec2e4ecff17f48b3a110388c1c5debde7b1a210943201ed8cd6d5832898be |