semvec/pypi-packages huggingface dataset:
sirataxi 0.0.3
Calculate sirataxi cost
License: MIT
Keywords: sira,taxi,siraarduino

AIBuilders Art
==============

แพ็คเกจนี้ใช้สำหรับโชว์รูปศิลปะ ascii ซึ่งได้ผลงานมาจากสมาชิกเพจ
AIBuilders ช่วยกันเขียนขึ้นมา

วิธีติดตั้ง
~~~~~~~~~~~

เปิด CMD / Terminal

.. code:: python

    pip install aibuildersart

วิธีใช้งาน
~~~~~~~~~~

.. code:: python

    from aibuildersart import *

    show = UncleEngineer()
    show.art()
    print("Author: {}".format(show.name))
altflags 0.0.3
Python alternative (binary) flags
License: MIT
Requires Python: >=3.8.0

<p align="center">
    <a href="https://github.com/NotOddity/altflags/blob/master/LICENSE" alt="License">
        <img src="https://img.shields.io/github/license/notoddity/altflags" /></a>
    <a href="https://pypi.org/project/altflags/" alt="PYVersion">
        <img src="https://img.shields.io/pypi/pyversions/altflags"/></a>
    <a href="https://github.com/NotOddity/altflags" alt="Downloads">
        <img src="https://img.shields.io/github/downloads/notoddity/altflags/total" /></a>
</p>

# alt-flags
`altflags` allows you to easily map, parse and manipulate binary flags

## Why?
1. The built in Python Flags and IntFlags didn't fit my needs
1. Simple usage to handle binary flag mapping, parsing and manipulation
1. Needs to run super efficiently and quick (same thing?)
1. This is my first public package, it's small and easy to maintain

## Quick Start
### 1. Install with pip from PyPi
`python -m pip install altflags`
### 2. Create altflags, Flags class
```
from altflags import Flags, flag

class Permissions(Flags):
    create_message = flag(0)
    delete_message = flag(1)
    edit_message = flag(2)

user_permissions = Permissions()
```
### 3. Edit your flags
```
# Set create_message and edit_message flags to true
user_permissions.create_message = True
user_permissions.edit_message = True

# print flags as binary
print("{:0b}".format(user_permissions.flags))
# >>> 101
# all flags are False (0) from initialization

# print flags as integer
print({:0n}.format(user_permissions.flags))
# >>> 5
```
### 4. Compare flags
```
user2_permissions = Permission()
user2_permissions.create_message = True
user2_permissions.edit_message = True

print(user_permissions == user2_permissions)
# >>> True

user2_permissions.create_message = False
print(user_permissions == user2_permissions)
# >>> False
```

### 5. Extend altflags with class methods that return pre-formatted flag objects
```
class Permissions(Flags):
    create_message = flag(0)
    delete_message = flag(1)
    edit_message = flag(2)

    @classmethod
    def all(cls):
        new_cls = cls()
        new_cls.create_message = True
        new_cls.delete_message = True
        new_cls.edit_message = True
        return new_cls

user_permissions = Permissions.all()

print({:0b}.format(user_permissions))
# >>> 111

print({:0n}.format(user_permissions))
# >>> 7
```

### Notes
+ `flags(n: int)` n argument specifies the bit position of your flag (Warning: These can be overwritten).