Skip to main content

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

Project description

Athena-mvsh

PyPI GitHub Pages PyPI Downloads

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.21.tar.gz (22.7 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.21-py3-none-any.whl (26.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: athena_mvsh-0.0.21.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.12 Linux/6.11.0-1012-azure

File hashes

Hashes for athena_mvsh-0.0.21.tar.gz
Algorithm Hash digest
SHA256 7bcfb05f186e69ae659ca213712fd6145105a586205a1c0b499c290590d2ebe9
MD5 1294f8fa842cf2a76578e49226e59381
BLAKE2b-256 4b1df2f0028523504cfb2bbccf864e4d5067309ed219fd3c3403860e9608a0d2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: athena_mvsh-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 26.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.11.12 Linux/6.11.0-1012-azure

File hashes

Hashes for athena_mvsh-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 a2c23f7080e8108b868dac54456531adce709bc700e6815cbe7d31b52e7079db
MD5 83e712c779a28880bf59ff9b8e5716fc
BLAKE2b-256 35db1d704f5ab2066ec94be7f6759638b07414c100ed98f1834f9922e985a342

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