Skip to main content

This is a simple example of getting data from a server Polymatica Platform

from polymatica_api import PolymaticaAPI
from polymatica_api.data_option import FilterAnd
from polymatica_api.types import DataOptionMethod, FilterMethod, SortDirection
import pandas as pd


p = PolymaticaAPI('{SERVER_URL}', 'Token {TOKEN}')
response = p.get_data([
    p.from_dataset('world_population.csv').
    method(DataOptionMethod.Aggregate).
    group("Country/Territory").
    sum(
        '2000 Population', 
        '2010 Population', 
        '2015 Population',
        '2020 Population',
        '2022 Population',
    ).
    sort("Country/Territory", SortDirection.Desc).
    sort("2010 Population", SortDirection.Desc).
    set_filter(
        FilterAnd("Country/Territory", FilterMethod.Equal, "Jamaica")
    )
])

data = response.get('default')
frame = pd.DataFrame(data.rows)
frame.rename(columns=data.column_map, inplace=True)
print(frame)

Metadata

Release files for polymatica-api 0.2.4

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

Source distribution (sdist)

Source distribution for polymatica-api 0.2.4
File Size Uploaded Provenance
polymatica_api-0.2.4.tar.gz 5.1 kB Without provenance Details

Release files / polymatica_api-0.2.4.tar.gz

Download URL polymatica_api-0.2.4.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
299031c23316565c461b0332c1f14ddc26d06185f1200b2e3e687766e76f2414
BLAKE2b-256 checksum
How to use checksums
5a9a402bb92c75f23d27ac93d42d39c3a1ecf8eb0abde81cd75a5b692d65a1a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.7

Security for polymatica-api 0.2.4

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