# 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:
```python
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](pretty_print_xml.png?raw=true "Pretty Print XML")
## 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "pyfris",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "api, flanders, fris, information, pyfris, python, research, soap, space",
"author": null,
"author_email": "G\u00f6rkem Uyan\u0131k <uyanikhg@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/93/12/04c181d0a04a6364c28605af0511e8e6088b99a14656fe841fb73508c019/pyfris-0.0.2.tar.gz",
"platform": null,
"description": "# pyfris\n\npyfris is a Python API that allows you to interact with the SOAP API server of the Flanders Research Information Space (FRIS).\n\n## Installation\n\nYou can install pyfris using pip:\n\n```\npip install pyfris\n```\n\n## Requirements\n\n- Python 3.8 or higher\n- Required packages: requests, bs4\n\n## Usage\n\nHere's a quick example of how to use pyfris:\n\n```python\nfrom pyfris.fris_api import FRIS_API\n\n# Create an instance of the FRIS_API\nfris = FRIS_API()\n\n# Search for projects\nprojects = fris.search_projects(\"protein\", 10)\nprint(projects)\n\n# Search for publications\npublications = fris.search_pubs(\"protein\", 10)\nprint(publications)\n\n# Get project details\nproject_id = list(projects.keys())[1]\nproject_details = fris.get_project(project_id)\nprint(project_details)\n\n# Get publication IDs for a project\npub_ids = fris.get_pub_ids(project_id)\nprint(pub_ids)\n\n# Get publication details\npublication_details = fris.get_publication(pub_ids[0])\nprint(publication_details)\n\n# Create a second instance of the FRIS_API\n# to see if the VODS data is already cached\nfris2 = FRIS_API()\n```\n\n## Features\n\n- Search for projects and publications\n- Retrieve detailed information about projects and publications\n- Get publication IDs associated with a project\n- Pretty print XML responses\n\n## API Reference\n\n### FRIS_API\n\nThe main class for interacting with the FRIS API.\n\n#### Methods\n\n- `search_projects(query: str, n: int = 10, verbose: bool = False)`: Search for projects given a query.\n- `search_pubs(query: str, n: int = 10, verbose: bool = False)`: Search for publications given a query.\n- `get_pub_ids(uuid: str, verbose: bool = False)`: Retrieve all publication IDs for a project given its UUID.\n- `get_project(uuid: str, verbose: bool = False)`: Retrieve project information given its UUID.\n- `get_publication(pub_id: str, verbose: bool=False)`: Retrieve publication information given its ID.\n- `ppxml(xml)`: Pretty print XML responses. Only used when verbose=True. Example output snippet below.\n\n![snippet](pretty_print_xml.png?raw=true \"Pretty Print XML\")\n\n## Testing\n\nTo run the tests, use the following command:\n\n```\npython -m unittest -v tests/test_fris_api.py\n```\n\n## License\n\nThis project is licensed under the MIT License.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## Authors\n\n- H. G\u00f6rkem Uyan\u0131k\n\n## Acknowledgements\n\nThis package interacts with the Flanders Research Information Space (FRIS) API. We thank FRIS for providing access to their research information system.",
"bugtrack_url": null,
"license": null,
"summary": "FRIS Python API",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/guyanik/pyfris",
"Issues": "https://github.com/guyanik/pyfris/issues"
},
"split_keywords": [
"api",
" flanders",
" fris",
" information",
" pyfris",
" python",
" research",
" soap",
" space"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9dbfc726ce2a80ebc0176af82a74efdca058963895ba535c2cd5123086b3c726",
"md5": "7001d59336c1506409ba19c808ee217c",
"sha256": "f98ff9f11304f0ccdcf8cd5ee376737538a7421a605aeba0d80282919abaed77"
},
"downloads": -1,
"filename": "pyfris-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7001d59336c1506409ba19c808ee217c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 5660,
"upload_time": "2024-09-18T11:25:14",
"upload_time_iso_8601": "2024-09-18T11:25:14.433217Z",
"url": "https://files.pythonhosted.org/packages/9d/bf/c726ce2a80ebc0176af82a74efdca058963895ba535c2cd5123086b3c726/pyfris-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "931204c181d0a04a6364c28605af0511e8e6088b99a14656fe841fb73508c019",
"md5": "9802d639b878201a8aa4b925e9fa4d31",
"sha256": "0cd26e3b6bb40a768b40587e4dc39786234816414c577a98c60d78fb141c7c0d"
},
"downloads": -1,
"filename": "pyfris-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "9802d639b878201a8aa4b925e9fa4d31",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 186407,
"upload_time": "2024-09-18T11:25:16",
"upload_time_iso_8601": "2024-09-18T11:25:16.059231Z",
"url": "https://files.pythonhosted.org/packages/93/12/04c181d0a04a6364c28605af0511e8e6088b99a14656fe841fb73508c019/pyfris-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-18 11:25:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "guyanik",
"github_project": "pyfris",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyfris"
}