Skip to main content

Readma? What's Readma?

Project description

Readma? What's Readma?

Readma is a binary stream reading library I made for fun that I decided I would extend on and release

Well, what does it do?

Well I'm glad you asked!

Readma is a little library I started to help with parsing binary files.

That's it?

Well yeah, what did you expect? Some large module I've been writing my entire life that will change the world with its amazing binary reading ability?

Cool Badges

Tests

Usage

Note, requires Python 3.8 or higher (For now at least)

Installation

pip install readma

Sample code

from readma import Readma

# Let's say this file contains in order:
# - An integer
# - An unsigned integer
# - A float
# - A string prefixed by its length with a byte
# - An unknown amount of data you just really need read
r = Readma("some_file.bin") # note: defaults to Little Endian

integer = r.read(4) # size in bytes
unsigned_integer = r.uread(4)

a_float = r.float()

length = r.read(1)
string = r.bytes(length)

important_data = r.readall()

Example of ways to do the same action

from readma import Readma, ReadmaTypes

r = Readma(b"AAAABBBBCCCCDDDD")

A = r.read(4)  # Reads a 32 bit (4 byte) integer
B = r.read("int")  # this also reads a 32 bit int
C = r.read(ReadmaTypes.int)  # someone might prefer this idk
D = r.bytes(4)  # its a bytestring, do whatever with it

Documentation

tba

License

Copyright (c) 2021 whamer100
This project is MIT licensed.


hey is this project name just one big ligma joke

maybe

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

readma-1.0.1a0.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

readma-1.0.1a0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file readma-1.0.1a0.tar.gz.

File metadata

  • Download URL: readma-1.0.1a0.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5

File hashes

Hashes for readma-1.0.1a0.tar.gz
Algorithm Hash digest
SHA256 9da16afd3ac7ea7acbdaee50a66b2ecd6b36ff0f3f3f0325bb06ecf1b9bfe67f
MD5 7ffea0d3da4b660f75805d02ab73597e
BLAKE2b-256 31f5167e7403350f977f26e6687ff80c091dd8aae300aa62fe919f416e201be0

See more details on using hashes here.

File details

Details for the file readma-1.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: readma-1.0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.5

File hashes

Hashes for readma-1.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 7816ae3e6c5ce2428c7cd4f0f7e7a0e42c7f43e70db898c4663dd469b5e17768
MD5 385d1b8efef633bf2a5eebc5c6f10e19
BLAKE2b-256 789d193e7dc809d53c594333e22c8739bd88e0706397ceb6f469e034753fbd98

See more details on using hashes here.

Supported by

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