GithubHelp home page GithubHelp logo

bryl's Introduction

bryl

image

image

Declaratively defining then:

  • constructing and
  • serializing

fixed sized records that are composed of:

  • typed
  • fixed sized

fields. This might look e.g. like:

import datetime

import bryl


class MyRecord(bryl.Record):

  a = bryl.Alphanumeric(length=20)

  b = bryl.Date('YYYYMMDD')

  c = bryl.Numeric(length=10, align=bryl.Field.LEFT)

  filler = bryl.Alphanumeric(length=10).reserved()

r = MyRecord(
  a='hello',
  b=datetime.datetime.utcnow().date(),
  c=12312,
)
assert isinstance(r, dict)
print MyRecord.c.offset, MyRecord.c.length
assert MyRecord.load(r.dump()) == r

Some applications:

use

$ pip install bryl

dev

$ git clone [email protected]:balanced/bryl.git
$ cd bryl
$ mkvirtualenv bryl
(bryl)$ pip install -e .[tests]
(bryl)$ py.test

release

Now that all tests are passing:

  • Update bryl.__version__ to new {version}.
  • Commit that git commit -am "Release v{version}"
  • Tag it git tag -a v{version} -v v{version}
  • Push it git push origin --tags

and travis will take it from there.

bryl's People

Contributors

bninja avatar

Watchers

 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.