Library designed for interacting with the AEMPS API
Project description
aempsconn
Library designed for interacting with the AEMPS API.
Examples
import aempsconn
# Initialize all the modules with the same configuration.
aemps = aempsconn.Orchestrate(logger=aempsconn.CustomLogger(level=50))
# Create a filter needed for the wanted request.
# This filter is custom for "/medicamento" endpoint.
filter1 = aemps.filter_medicamento.num_registro.equals("59494")
# Download the med that satisfies the previous custom filter.
med = aemps.medicamento.get(filter=filter1)
# If med is not null prints the name.
if med is not None:
print(med.nombre)
# Create a new filter needed for the wanted request.
# This filter is custom for "/medicamentos" endpoint.
filter2 = (
aemps.filter_medicamentos.nombre.equals("paraceta*")
.comercializado.equals(True)
.laboratorio.equals("cinfa")
.receta.equals(True)
)
# Download all the meds that satisfy the previous custom filter.
meds = aemps.medicamentos.get(filter=filter2)
# If meds are not null iterates and prints the names.
if meds is not None:
for med in meds:
print(med.nombre)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aempsconn-0.1.1.tar.gz
(10.9 kB
view hashes)
Built Distribution
aempsconn-0.1.1-py3-none-any.whl
(20.0 kB
view hashes)
Close
Hashes for aempsconn-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97784e387d9e048857810fef64d61c587f55b11bacc3ecd39d77084911d90f2b |
|
MD5 | d6ed7e7f1aee1602634523539796d16b |
|
BLAKE2b-256 | 1169637beff14af8fdedae7bd37b7e02775cbcccb72fca812734b308b5f2e3af |