Giter Site home page Giter Site logo

datatyping's Introduction

datatyping

What is it?

Enforce the types of your python data structures with templates!

Why?

See: How Python Makes Working With Data More Difficult In The Long Run.

Nay more do you have to wonder if your data conforms to an expected format. Now when someone asks wtf is in your api response, you can simply point at your template and say "that stuff".

Wtf is a template?

my_data_template = {
    "stuff": int,
    "list of stuff": [int, int, int],
    "nested stuff": [int, int, [str, str, str]],
    "woah": [{"wow": int, "data": int, "typing": {"is": str, "cool": dict}}]
}

You can describe your data structures in as little or as much detail as you like. datatyping will only ensure the types of described areas in the data, so if your real data-set is a gigantic mess and you only need a certain part, you need only describe that part, the rest will be ignored :D

What's a good use case?

Even just having a data template in your code is a nice way to document the kind of data you're getting from say, a web-api. Being able to actually validate that data is even better!

About

Shoutout to ##lp, and the fine folks of 8banana

datatyping was created by Mark Jameson and PurpleMyst

https://theelous3.net

datatyping's People

Watchers

 avatar  avatar

Forkers

purplemyst

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.