Skip to main content

FRIS Python API

Project description

pyfris

pyfris is a Python API that allows you to interact with the SOAP API server of the Flanders Research Information Space (FRIS).

Installation

You can install pyfris using pip:

pip install pyfris

Requirements

  • Python 3.8 or higher
  • Required packages: requests, bs4

Usage

Here's a quick example of how to use pyfris:

from pyfris.fris_api import FRIS_API

# Create an instance of the FRIS_API
fris = FRIS_API()

# Search for projects
projects = fris.search_projects("protein", 10)
print(projects)

# Search for publications
publications = fris.search_pubs("protein", 10)
print(publications)

# Get project details
project_id = list(projects.keys())[1]
project_details = fris.get_project(project_id)
print(project_details)

# Get publication IDs for a project
pub_ids = fris.get_pub_ids(project_id)
print(pub_ids)

# Get publication details
publication_details = fris.get_publication(pub_ids[0])
print(publication_details)

# Create a second instance of the FRIS_API
# to see if the VODS data is already cached
fris2 = FRIS_API()

Features

  • Search for projects and publications
  • Retrieve detailed information about projects and publications
  • Get publication IDs associated with a project
  • Pretty print XML responses

API Reference

FRIS_API

The main class for interacting with the FRIS API.

Methods

  • search_projects(query: str, n: int = 10, verbose: bool = False): Search for projects given a query.
  • search_pubs(query: str, n: int = 10, verbose: bool = False): Search for publications given a query.
  • get_pub_ids(uuid: str, verbose: bool = False): Retrieve all publication IDs for a project given its UUID.
  • get_project(uuid: str, verbose: bool = False): Retrieve project information given its UUID.
  • get_publication(pub_id: str, verbose: bool=False): Retrieve publication information given its ID.
  • ppxml(xml): Pretty print XML responses. Only used when verbose=True. Example output snippet below.

snippet

Testing

To run the tests, use the following command:

python -m unittest -v tests/test_fris_api.py

License

This project is licensed under the MIT License.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Authors

  • H. Görkem Uyanık

Acknowledgements

This package interacts with the Flanders Research Information Space (FRIS) API. We thank FRIS for providing access to their research information system.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfris-0.0.2.tar.gz (186.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyfris-0.0.2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file pyfris-0.0.2.tar.gz.

File metadata

  • Download URL: pyfris-0.0.2.tar.gz
  • Upload date:
  • Size: 186.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for pyfris-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0cd26e3b6bb40a768b40587e4dc39786234816414c577a98c60d78fb141c7c0d
MD5 9802d639b878201a8aa4b925e9fa4d31
BLAKE2b-256 931204c181d0a04a6364c28605af0511e8e6088b99a14656fe841fb73508c019

See more details on using hashes here.

File details

Details for the file pyfris-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: pyfris-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.13

File hashes

Hashes for pyfris-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f98ff9f11304f0ccdcf8cd5ee376737538a7421a605aeba0d80282919abaed77
MD5 7001d59336c1506409ba19c808ee217c
BLAKE2b-256 9dbfc726ce2a80ebc0176af82a74efdca058963895ba535c2cd5123086b3c726

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page