You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

m-data-science-helpers

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-data-science-helpers

Helpers for AWS most common operations. Includes clipboard auth


Maintainers
1

Readme

Data Science Helpers

AWS Handler

AWSHandler es un wrapper para funcionalidades de aws. Autentica automaticamente tomando las credenciales desde el clipboard (solo tienen que copiarlas desde Get credentials --> Command Line or Programatic Access --> Copy Credentials) y luego borra el clipboard

Instalacion

!pip install m-data-science-helpers

Ejemplo de uso

from m_data_science_helpers.aws_utils import AWSHandler

# Con las credenciales en clipboard, crear una instancia de AWSHandler (podes obtenerlas desde desde Command Line or Programatic Access)
aws_handler = AWSHandler()

Consultar datos usando Athena

sql = "SELECT * FROM mi_base_de_datos.mi_tabla LIMIT 10"
database = "mi_base_de_datos"
result_df = aws_handler.query(sql, database)
print(result_df)

Listar tablas y vistas en una base de datos

database_info = aws_handler.list_tables("mi_base_de_datos")
print(database_info)

Listar todas las bases de datos

databases = aws_handler.list_data_sources()
print(databases)

Guardar un DataFrame en S3

aws_handler.save_df(df, 'mi_bucket', 'filename.parquet', file_format='parquet')

Cargar un DataFrame desde S3

loaded_df = aws_handler.load_df('mi_bucket', 'filename.parquet')
print(loaded_df)

Listar todos los buckets disponibles

aws_handler.list_all_buckets()

Listar objetos en una carpeta específica de un bucket de S3

aws_handler.list_bucket("mi_bucket", "prefijo_carpeta/")

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc