Skip to main content

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

Project description

Athena-mvsh

PyPI GitHub Pages

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: athena_mvsh-0.0.19.tar.gz
  • Upload date:
  • Size: 22.6 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.19.tar.gz
Algorithm Hash digest
SHA256 33f4e5d80d2480434552f993e5e1993e8d50336f340bf190d5c07de5dd703248
MD5 67aff271b0b6f39391c768575c34dffd
BLAKE2b-256 3a2e432de5d09ba141d39463db89d44ef5e3ba1d3859a17cff26ec2ee01232e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: athena_mvsh-0.0.19-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.19-py3-none-any.whl
Algorithm Hash digest
SHA256 dc3eac4c05e82f7007016c69f9358b094c348566fd66d911220c1aa35835fcff
MD5 c071d322290f0ce631405f3fa83fca16
BLAKE2b-256 4d1cc7e205ecb97c1beef0f46f398824a526099cbe8ed0c77db6e036904a6daa

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