Skip to main content

Athena-mvsh é um biblioteca python, que interage com o serviço Amazon Athena

Project description

Athena-mvsh

PyPI

O que é o Athena-mvsh ?

Athena-mvsh é um biblioteca python, que interage com o serviço Amazon Athena, que é um serviço de consulta interativa que permite usar SQL para analisar dados diretamente no Amazon S3.

Algumas regras da DB API 2.0 (PEP 249) são implementadas.

Instalação

pip install athena-mvsh

Credenciais

Para se conectar é preciso informar o aws_access_key_id, aws_secret_access_key o local de saida das consultas s3_staging_dir e a regiao do bucket region_name. Se você usar o arquivo de perfil padrão, não será necessário informar as credenciais.

from athena_mvsh import (
    Athena,
    CursorPython
)

cursor = CursorPython(
    s3_staging_dir='s3:/caminho-saida-consulta/',
    aws_access_key_id='KEY_ID',
    aws_secret_access_key='SECRET_KEY',
    region_name='us-east-1'
)

with Athena(cursor=cursor) as cliente:
    cliente.execute("SELECT 1")
    rst = cliente.fetchone()

Como usar ?

Esta biblioteca Python facilita a consulta ao Amazon Athena, oferecendo suporte para três tipos de cursores: Python, Parquet e DuckDB. Com esta biblioteca, você pode executar consultas SQL no Amazon Athena e obter os resultados no formato desejado de maneira fácil e eficiente.

Funcionalidades Consulta ao Amazon Athena: Execute consultas SQL no Amazon Athena.

Cursores Diversos:

  • CursorPython: Retorna os resultados da consulta como objetos Python.
  • CursorParquet: Retorna os resultados da consulta no formato Parquet.
  • CursorParquetDuckdb: Retorna os resultados da consulta integrados ao DuckDB.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

athena_mvsh-0.0.14.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

athena_mvsh-0.0.14-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file athena_mvsh-0.0.14.tar.gz.

File metadata

  • Download URL: athena_mvsh-0.0.14.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Windows/10

File hashes

Hashes for athena_mvsh-0.0.14.tar.gz
Algorithm Hash digest
SHA256 ac1e3ebfb2117eb559336cd1edc549e3876d6eb5dc6221b6c61f5645ce4d25b3
MD5 173737a37391378dc1309214db7f33d4
BLAKE2b-256 dd2e01c0f9d2f0b74e1bff4c9f9710c9c26fd3560b80a706ce6e51649bc1a126

See more details on using hashes here.

File details

Details for the file athena_mvsh-0.0.14-py3-none-any.whl.

File metadata

  • Download URL: athena_mvsh-0.0.14-py3-none-any.whl
  • Upload date:
  • Size: 26.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Windows/10

File hashes

Hashes for athena_mvsh-0.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 19cda0cb7cc51b7f0d29b95d182a28289d24f4f6263226b45b0dd1a4e57b3592
MD5 8e7efa9db11b1e7f853f08dc866e7675
BLAKE2b-256 59e78d7e96d8902fdae83fff3cfc6386fb6bc4320d60482397c0a69e76c755ba

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page