Skip to main content

Version-independent bytes-chains

Project description

Byt
===

Version-independent bytes-chains

Built by `Guillaume Schworer <https://github.com/ceyzeriat>`_. Licensed under
the GNU General Public License v3 or later (GPLv3+) license (see ``LICENSE``).


Installation
------------

Just run

::

pip install byt

to get the most recent stable version.


Usage
-----

The only entry point is the ``byt.Byt`` class which automatically loads
depending on the python version you're running. You'll just use it like this:

::

from byt import Byt

b = Byt('hello world!')
print(b)
>> Byt('hello world!')
print(b.hex())
>> '68 65 6c 6c 6f 20 77 6f 72 6c 64 21'
print(byt.Byt('str1') + 'str2')
>> TypeError: can't concat Byt to str
byt.Byt('str1')[2:].ints()
>> [114, 49]


Documentation
-------------

All the options are documented in the docstrings for the ``Byt`` class. These can be viewed in a Python shell using:

::

from byt import Byt
print(Byt.__doc__)

or, in IPython using:

::

from byt import Byt
Byt?


License
-------

Copyright 2017 Guillaume Schworer

patiencebar is free software made available under the GNU General
Public License v3 or later (GPLv3+) license (see ``LICENSE``).


Changelog
---------

1.0.12 (2017-08-12)
++++++++++++++++++

- Added DByt hexadecimal as the default __str__, while __repr__ remains ASCII-based
- New method 'str'


1.0.8 (2017-06-26)
++++++++++++++++++

- Fixed repr method and backslashing


1.0.6 (2017-03-22)
++++++++++++++++++

- Fixed install bug through pip


1.0.4 (2017-03-22)
++++++++++++++++++

- Added fromhex classmethod


1.0.3 (2017-02-22)
++++++++++++++++++

- Fixed bug when invoking isinstance on a Byt object


1.0.0 (2017-02-19)
++++++++++++++++++

- Initial release.

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

byt-1.0.12.tar.gz (5.8 kB view details)

Uploaded Source

File details

Details for the file byt-1.0.12.tar.gz.

File metadata

  • Download URL: byt-1.0.12.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for byt-1.0.12.tar.gz
Algorithm Hash digest
SHA256 a79e3a2cf3af012fa4b3c15646400060c3c5a82dec06e573d877d3c19a2dfce8
MD5 f8c6cf0ca9abb47ab0ef40bbb3079e78
BLAKE2b-256 db0167ab795abff031e7450bb556d04ea3251fd75d3046c0885b8dbc53c08527

See more details on using hashes here.

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