Siris Scraper
This is a non-official scraper for statistical data from the Skolverket’s (https://www.skolverket.se/skolutveckling/statistik/)[SIRIS database] built on top of the Statscraper package <https://github.com/jplusplus/statscraper>. It lets you interact with the stat export interface in a pythonic way.
Install
pip install siris_scraper
Example usage
from siris.scraper import SirisScraper
# Init scraper
scraper = SirisScraper()
# List all schooltypes
skolformer = scraper.items
# Select a dataset
dataset = skolformer.get_by_label(u"Grundskolan")\
.items.get_by_label("Kommunnivå")\
.items.get_by_label("Personal")\
.items.get_by_label("Personalstatistik")
# Make a query
res = dataset.fetch() # Get latest available data
#res = dataset.fetch({"period": "2015"}) # Get data for a given period
#res = dataset.fetch({"period": "*"}) # Get data all periods
# List all avilable periods
print(dataset.periods)
# Use the result
# ...in Python Pandas for example
dataframe = res.pandas
Develop
Set up:
pip install -r requirements.txt
Run tests:
make tests
Deploy
To pypi:
python3 deploy_to_pypi.py
Todo
Handle filtering in export (“Begränsa träfflista”)
Metadata
Release files for siris-scraper 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| siris_scraper-0.4.0.tar.gz | 7.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| siris_scraper-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.6 kB
Release files / siris_scraper-0.4.0.tar.gz
| Download URL | siris_scraper-0.4.0.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
57794dcdb3ace3da91f4baccfa33d5007c2d40a5e9c00fd764a3adcf161a6891
|
|
BLAKE2b-256 checksum How to use checksums |
374a775620603df5adab8679a8451c51037b1c0bc7565018f680caf0b7782a5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/6.0.0 pkginfo/1.8.1 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Release files / siris_scraper-0.4.0-py3-none-any.whl
| Download URL | siris_scraper-0.4.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0fa906109de04c542d905480acf2a639c1da9fb663d0c8aeb185284f6cd2869
|
|
BLAKE2b-256 checksum How to use checksums |
611a567bd705dacbf08783dbf7af4d95b1deb5d90c28a62088178bc4672c6a42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/6.0.0 pkginfo/1.8.1 requests/2.28.2 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.10
|
Security for siris-scraper 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.