Molgenis-py-client

Latest version: v2.4.1

Safety actively analyzes 682361 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

2.4.0

Features
New functionalities are added:
- `to_upload_format`: Changes the output of the REST Client such that it can be uploaded again:
1. Non-data fields are removed (`_href` and `_meta`).
2. Reference objects are removed and replaced with their identifiers.
- `update_all`: Updates multiple rows at once
- `upsert`: Combination of `update_all` and `add_all`, the client decides what to use (checks existing IDs).
- `import_data`: Extension of `upload_zip`, includes the creation of the zip file and waits for the upload process to be finished
- `get_meta`: Similar to `get_entity_meta_data`, but uses the newer Metadata API instead of the REST API V1.

New parameters are added to existing methods:
- `get_by_id: uploadable`: if `True` the data will be returned in an uploadable format (`to_upload_format` is called);
- `get: uploadable`: if `True` the data will be returned in an uploadable format (`to_upload_format` is called);
- `upload_zip`:
- `asynchronous`: if `True` it does not wait till the upload is finished.
- `data_action`: Options are: `[ADD, UPDATE, UPSERT, IGNORE]`
- `metadata_action`: Options are: `[ADD, ADD_UPDATE_EXISTING, UPDATE, ADD_IGNORE_EXISTING]`

Refactoring:
- Moved most of the private methods to separate modules

2.3.1

Fixes
- 9 Unclear error message when forgetting `/api` in url
The URL can now also be passed without the `/api` postfix

2.3.0

Feature
Create a session with a token. This makes the client usable in libraries or scripts where the user already is logged in or has a token.


session = molgenis.Session(api_url, token=<token>)


Fixes
Block all cookies

2.2.0

Features

- The `get` endpoint can now retrieve items in batches (and can thus be used to get more than 10.000 items).

Fixes
- `expand` not working correctly for `get_by_id`

2.0.0

Features
- Get uses the v2 version of the API
- Error messages show the molgenis error message, rather than a vague message without the molgenis information
- Possible to retrieve data and metadata with one get request using the "raw" option

Breaking
- Api v2 is used for the get request, therefore the query syntax is altered. RSQL format should be used for queries.
- Api v2 is used for the get request, therefore the response of the get is also changed.
- The MolgenisRequestErrors are thrown for every exception. They have the response (if available) stored in their args, rather than in the Exception itself (which was the case for the previous request exceptions).
- The tutorial doesn't work anymore because the server it links to has an ancient version of molgenis that does not have the REST API v2 yet.

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.