Skip to main content

AWS metadata as dataframes

Project description

Submodules

awsdf.aws module

This module enables connecting to AWS and extracting metadata in pandas dataframes.

Installing from PyPI: pip install -U awsdf

USAGE:

import awsdf

aws_account = awsdf.Account(profile_name=”<PROFILE_NAME>”)

glue_databases_df = aws_account.glue_get_databases()

class awsdf.aws.Account(aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, region_name=None, profile_name=None)

Instantiate class object for connecting to AWS and retriving metadata from AWS

__init__(aws_access_key_id=None, aws_secret_access_key=None, aws_session_token=None, region_name=None, profile_name=None)

Provide access keys OR Profile name to connect to AWS account. Keys take preceedence

Parameters:

aws_access_key_id (string) – AWS access key ID

aws_secret_access_key (string) – AWS secret access key

aws_session_token (string) – AWS temporary session token

region_name (string) – AWS region

profile_name (string) – AWS profile name

glue_get_jobs() -> DataFrame

Get AWS Glue jobs

Returns:

dataframe

glue_get_job_history(job_name, no_of_runs=1) -> DataFrame

Retrieve glue job history

Arguments:

job_name – Name of job to retrive history

Keyword Arguments:

no_of_runs – No of runs to retrive in descending order (default: {1})

Returns:

dataframe

glue_get_databases() -> DataFrame

Get AWS Glue jobs

Returns:

dataframe

glue_get_tables(dbname=None) -> DataFrame

Get AWS Glue tables

Keyword Arguments:

dbname – Database Name for which to retrieve tables (default: {None})

Returns:

dataframe

glue_get_fields(dbname, tablename) -> DataFrame

Get AWS Glue table columns

Keyword Arguments:

dbname – Database Name for table tablename – Database Name for which to retrieve columns

Returns:

dataframe

athena_data_dictionary(skip_dbs: list = []) -> DataFrame

Get AWS Athean data dictionary. A data frame with all databases, tables & fields with datatypes

Keyword Arguments:

skip_dbs (optional) – list of databases to be skiped

Returns:

dataframe

Module contents

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

awsdf-0.1.10.tar.gz (8.7 kB view hashes)

Uploaded Source

Built Distribution

awsdf-0.1.10-py3-none-any.whl (8.7 kB view hashes)

Uploaded Python 3

Supported by

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