Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Readme
This repository aims to simplify the access to the Swiss Federal Statistical Office metadata. Following the implementation in the interoperability platform and the SIS portal, the APIs are made available here in python. This public library is made available for the internal FSO staff, the federal administration and for external actors.
You can install the library with
pip install fso_metadata
then at the beginning of your python script, you will need to
import fso_metadata
Based on the metadata that you want, you will call certain functions and parameters. In the first part, we describe the API available from everywhere, then we describe the API available only from within the confederation network.
response = get_codelist(
identifier,
export_format="SDMX-ML",
version_format=2.1,
annotations=False
)
Parameters:
- identifier (str): the codelist's identifier
- environment (str, default="PRD"): environment to call
Available are 'PRD', 'ABN', 'TEST', 'QA' and 'DEV'.
- export_format (str, default="SDMX-ML"): the export's format.
Available are CSV, XLSX, SDMX-ML or SDMX-JSON.
- version_format (float, default=2.1): the export format's version
(2.0 or 2.1 when format is SDMX-ML).
- annotations (bool, default=False): flag to include annotations
Returns:
- response (pd.DataFrame or dict) based on the export format
- a pd.DataFrame if export_format was CSV or XLSX
- a dictionnary if export_format was SDMX-ML or SDMX-JSON.
response = get_nomenclature_one_level(
identifier,
level_number,
filters={},
language='fr',
annotations=False
)
Parameters:
- identifier (str): nomenclature's identifier
- environment (str, default="PRD"): environment to call
Available are 'PRD', 'ABN', 'TEST', 'QA' and 'DEV'.
- level_number (int): level to export
- filter (default={}): additionnal filters
- language (str, default='fr'): response data's language
Available are 'fr', 'de', 'it', 'en'.
- annotations (bool, default=False): flag to include annotations
Returns:
- response (pd.DataFrame): dataframe with 3 columns
(Code, Parent and Name in the selected language)
2. Export multiple levels of a nomenclature (from level_from
to level_to
)
response = get_nomenclature_multiple_levels(
identifier,
level_from,
level_to,
filters={},
language='fr',
annotations=False
)
Parameters:
- identifier (str): nomenclature's identifier
- environment (str, default="PRD"): environment to call
Available are 'PRD', 'ABN', 'TEST', 'QA' and 'DEV'.
- level_from (int): the 1st level to include
- level_to (int): the last level to include
- filter (default={}): additionnal filters
- language (str, default='fr'): response data's language
Available are 'fr', 'de', 'it', 'en'.
- annotations (bool, default=False): flag to include annotations
- post_processing (bool, default=False): flag to post-process
Returns:
- response (pd.DataFrame): dataframe columns from `level_from` to `level_to` codes
As the APIs continue to be implemented, further functionnalities will be added.
All the APIs made available in this library are also documented in Swagger UI should you want to do more experiments through a UI. See here for APIs of the interoperability platform (public).
Examples for each API are provided in the notebook examples.ipynb.
FAQs
FSO metadata access automation. Seamless access to SMS 2.0 APIs in Python.
We found that fso-metadata demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.