Giter Club home page Giter Club logo

byrne's Introduction

Byrne

A intelligent DynamoDB frontend for Python3

Basic Usage

Importing the package

    import boto3  # require to build a client
    import byrne

Creating a client

    session = boto3.Session()
    base_client = session.client("dynamodb")
    client = byrne.DynamoDB(base_client)
    client.list_tables()  # ["table", "names"]

Creating a Table

    table_def = byrne.datastructures.TableDefinition(
        "TableName",
        {
            "id": "S"
        },
        byrne.datastructures.KeyDefinition("id")
    )

    client.create_table(table_def)

FAQ

  1. How do I install byrne?

    • Simply run pip3 install byrne - the PyPI package is automatically kept up to date with this repository.
  2. Why does this require Python 3.7?

    • We use dataclasses heavily to model table metadata and to simplify query expressions.
  3. Why is this better than using the default client in boto3?

    • Support for asyncronous result pagination.
    • Allows for integrated object mapping.
    • Configurable value marshalling and unmarshalling.
    • A more Pythonic interface.
    • Builtin support for working with DAX.
  4. How is the package tested?

    • The testing regimen is automated through tox.
    • Tests are run against a DynamoDB Local instance for all supported Python versions.
    • The tests are run against the live DynamoDB service in AWS us-east-1 for the latest Python version.
    • Code coverage is tracked through Coveralls.
  5. Why is the DAX code path untested?

    • We are working on creating a testing strategy for DAX workflows.
    • DAX is expensive, we can't justify having a dedicated cluster running only for testing.
  6. I can't run the test cases on my local machine! Help!

    • There are 5 test environments defined in tox.ini:
      1. test: Runs test suite against "real" DynamoDB.
      2. test_local: Runs test suite against DynamoDB Local.
      3. test_coverage: Same as test, with coverage reporting.
      4. test_coverage_local: Same as test_local, with coverage reporting.
      5. flake8: Runs PEP8 conformance testing.
    • The live test cases require AWS credentials on your machine.
    • These credentials need access rights to assume a role used for testing.
    • Access to this role is only granted to trusted contributors.
    • You should be able to run the local environments after executing the run_dynamodb_local.sh script.
    • flake8 should run without any fuss.

byrne's People

Contributors

jacobneiltaylor avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.