Skip to main content

CircleCI Actions codecov Language grade: Python License Tag PyPI

Metabasic

Dead simple client for interacting with the Metabase dataset API

Install

pip install metabasic

Examples

from metabasic import Metabasic
domain = "https://my-metabase-domain.com"

# Authentication with an existing session
db = Metabasic(domain, session_id="foo", database_id=1)
db.query("SELECT * FROM bar")
db.get_dataframe("SELECT * FROM bar")

# Email/Password authentication
ga = Metabasic(domain, database_id=2).authenticate("foo@email.com", "password")
ga_query = {
    "ids": "ga:1234567890",
    "start-date": "30daysAgo",
    "end-date": "today",
    "metrics": "ga:someMetric",
    "dimensions": "ga:someDimension",
    "sort": "ga:someDimension",
    "max-results": 10000
}
ga.query(json.dumps(ga_query))

# Select a database interactively
m = (
  Metabasic(domain)
  .authenticate("foo@email.com", "password")
  .select_database()
)

Metadata

Release files for metabasic 0.5.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 metabasic 0.5.1
File Size Uploaded Provenance Actions
metabasic-0.5.1.tar.gz 4.6 kB Without provenance Details for metabasic-0.5.1.tar.gz

Built distribution (wheel)

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

Total release size: 9.4 kB

Release files / metabasic-0.5.1.tar.gz

Download URL metabasic-0.5.1.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
fc920858e218cc1e891b39e2c6ee3b28792b4da4dcaf705cb232c735a06acc1e
BLAKE2b-256 checksum
How to use checksums
41e6b7e1c0d5df701c2b0281c3ca1bf875c1d1dee3edcbc103d4104f6d5caeae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/4.19.128-microsoft-standard

Release files / metabasic-0.5.1-py3-none-any.whl

Download URL metabasic-0.5.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b450c2f5abaeba46b3eec96ba0dd051db2b31d2a7f50a487fbbe560db036b10
BLAKE2b-256 checksum
How to use checksums
954151cbc5086ebee3932929f2647f188bfad48c03760608d9b686decf5b8e40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.9.1 Linux/4.19.128-microsoft-standard

Security for metabasic 0.5.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