Skip to main content

SSB Tbmd Apis Python

PyPI Status Python Version License

Documentation Tests Coverage Quality Gate Status

pre-commit Black Ruff Poetry

Tjenestebibliotek for metadata

Is an API built on top of Oracle in SSBs ON-prem environment for getting at metadata.
This package is written for extracting the information where possible.

Lenker ssb onprem:

Installation

You can install SSB Tbmd Apis Python via pip from PyPI:

poetry add ssb-tbmd-apis-python

Usage examples

Open a flatfile as a pandas dataframe with only the path to the datafile.

from ssb_tbmd_apis.imports.datadok_open_flatfile import datadok_open_flatfile_from_path

df = datadok_open_flatfile_from_path(
    "/ssb/stam/utdanning/vgogjen/mappe/g2023"
)

Store a json of the "filbeskrivelse" - the metadata to interpret a "fixed-width-file" / "flatfile". This stores the json next to the datafile, with the suffix "__MIGRERDOK.json"

from ssb_tbmd_apis.exports.migrerdok import save_migrerdok_for_flatfile
migrer_path = save_migrerdok_for_flatfile(
    "$DOLLAR/team/archive/folder/g2001", overwrite=True
)

Get metadata from the old "vardok".

from ssb_tbmd_apis.operations.operations_vardok import (
    vardok_concept_variables_by_name_def,
    vardok_concept_variables_by_owner
)

len(vardok_concept_variables_by_owner("360"))

print(vardok_concept_variables_by_owner("360"))

print(vardok_concept_variables_by_name_def("nus2000"))

Please see the Reference Guide for further details.

License

Distributed under the terms of the MIT license, SSB Tbmd Apis Python is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from Statistics Norway's SSB PyPI Template.

Metadata

Release files for ssb-tbmd-apis-python 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ssb-tbmd-apis-python 0.0.2
File Size Uploaded
ssb_tbmd_apis_python-0.0.2.tar.gz 24.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ssb-tbmd-apis-python 0.0.2
File Interpreter ABI Platform
ssb_tbmd_apis_python-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 54.8 kB

Release files / ssb_tbmd_apis_python-0.0.2.tar.gz

Download URL ssb_tbmd_apis_python-0.0.2.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
820a040ad22e7757ce3afc187d26d489af837af3025a3de35630f6b5dc95e9c7
BLAKE2b-256 checksum
How to use checksums
c99ab01a6d2d96a174b51d974944d27b4e2c450efa023180beb30235dbd725e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 19, 2026.

Transparency log

Release files / ssb_tbmd_apis_python-0.0.2-py3-none-any.whl

Download URL ssb_tbmd_apis_python-0.0.2-py3-none-any.whl
Size 30.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
900635ad6de31e90eb3fae39bf77713e5c429ccb96ddb210a26f65460383fd8e
BLAKE2b-256 checksum
How to use checksums
c3e053527adadf9d1353f0687427af426632c9ba30e984a85cc8dfd612d473a4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page