https://github.com/victor141516/myfbase
https://github.com/victor141516/myfbase
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/victor141516/myfbase
- Owner: victor141516
- License: mit
- Created: 2018-12-03T14:23:01.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-06T16:54:00.000Z (almost 6 years ago)
- Last Synced: 2025-03-02T16:39:20.822Z (4 months ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# myFbase
Change to/from any base you like: hexadecimal, binary or whatever you want.
## How to use
### Installation
$ pip install myFbase
### Usage
from myFbase import MyFbase
mfb = MyFbase('abc')
print(mfb.encode(8)) # cc
print(mfb.decode('cc')) # 8mfb = MyFbase('0123456789ABCDEF') # Hex base
print(mfb.encode(15)) # F
print(mfb.encode(16)) # 10
print(mfb.encode(4294967295)) # FFFFFFFF