Skip to main content

AEMPSconn

Library designed for interacting with the CIMA REST API (AEMPS). More information related to the official REST API can be found here.

Note: AEMPSconn is developed to make use of it with CIMA REST API v1.23.

Testing

Unit-tests for this new version are under development.

Installation

Use the package manager pip to install aempsconn.

pip install aempsconn

Usage

Each module has embedded in it the only type of filter it supports. The filters are created dynamically so depending on the type of data you want to obtain, it will ask for the type of value required for it.

If you want to filter by more than one value, simply concatenate all the desired filters, the query-builder will create the necessary query.

from aempsconn.aemps import AempsConn
from aempsconn.filter import (
    MaterialFilter,
    MedicamentoFilter,
    MedicamentosFilter,
    NotaFilter,
    PresentacionesFilter,
    RegistroCambiosFilter,
    VmppFilter,
)

aemps = AempsConn()

for med in aemps.medicamento.get(
    filter=MedicamentoFilter().nregistro.equals(value="62121")
):
    print(med.nombre)

for med in aemps.medicamentos.get(
    filter=MedicamentosFilter().nombre.startswith(value="meto")
):
    print(med.nombre)

for med in aemps.medicamentos.get(
    filter=MedicamentosFilter().nombre.startswith(value="")
):
    print(med.nombre)

for med in aemps.presentaciones.get(
    filter=PresentacionesFilter().vmp.equals("270671000140106")
):
    print(med.nombre)

for desc_cli in aemps.vmpp.get(filter=VmppFilter().nombre.contains("metotrexato")):
    print(desc_cli.vmpDesc)

for change in aemps.registro_cambios.get(
    filter=RegistroCambiosFilter().fecha.equals(value="20/12/2023")
):
    print(change)

for note in aemps.notas.get(filter=NotaFilter().nregistro.equals("69223")):
    print(note)

for material in aemps.materiales.get(
    filter=MaterialFilter().nregistro.equals("78632")
):
    print(material)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Disclaimer

The use of Spanish words or descriptions is intended to facilitate consistency between the official CIMA API and this library, so that the programmer does not hesitate with the name of each of the filters or data received.

This library is not official.

Metadata

Release files for aempsconn 1.1.1

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

Source distribution (sdist)

Source distribution for aempsconn 1.1.1
File Size Uploaded Provenance
aempsconn-1.1.1.tar.gz 12.3 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for aempsconn 1.1.1
File Interpreter ABI Platform
aempsconn-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 37.1 kB

Release files / aempsconn-1.1.1.tar.gz

Download URL aempsconn-1.1.1.tar.gz
Size 12.3 kB
Tags Source
SHA-256 checksum
How to use checksums
d8c3ed0dedd2148f9cfd9f19a4f27034cbcf737ac7c0150bdc6ceaa187c31953
BLAKE2b-256 checksum
How to use checksums
f1bfdb0daea34dd884cd321188f08f8a897adbc7d546a56a45b67bdf081ce258
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.12.1 Linux/6.5.0-1025-azure

Release files / aempsconn-1.1.1-py3-none-any.whl

Download URL aempsconn-1.1.1-py3-none-any.whl
Size 24.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0eb5b9961f6bbd5aac14436decf401e376e54b1cd515954378474e3638178a8d
BLAKE2b-256 checksum
How to use checksums
e9114a328d3ff3ee603054ba40e5ae123aa74044120235d01253c5ab14d8216f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.5 CPython/3.12.1 Linux/6.5.0-1025-azure

Security for aempsconn 1.1.1

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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