semvec/pypi-packages huggingface dataset:
Magicweb 2.0.3
A simple web framework
License: MIT
Keywords: Web,Web framework,framework

# Magicweb
Magicweb is a simple web framework that is still under developement. It currently supports route parameters and html templating but not template ineritance.

## Usage

### Installation

To install Magicweb you can run
`pip install Magicweb` or `pip3 install Magicweb`

To install Magicweb from source run

```shell
git clone https://github.com/mordy-python/magicweb
cd magicweb
python setup.py install
```

### Run a basic app

To create a simple app we need to import Magicweb and create an app instance
we need to add the \_\_file\_\_ variable to the app instance.

```python
import magicweb
app = magicweb.Magicweb(__file__)
```

Once our app is instantiated we can add routes

```python
import magicweb
app = magicweb.Magicweb(__file__)

@app.route('/')
def index(request, response):
  response.text = "Hello"
@app.route('/rendered')
def rendered(request, response):
  app.render('index.html')
```

We created two routes, one that returns hello world, and one that renders an html page. All html pages should be in a directory named html, although this can be overrdden when instantiting the App class.

To run our app we need to use the `app.run()` function

```python
...
run(app)
# to run with a different host/port just add those arguments
# run(app, host='0.0.0.0', port=5000)
```

We can also create routes with parameters

```python
import magicweb
app = magicweb.Magicweb(__file__)

@app.route('/{name}')
def index(request, response, name):
  response.text = "hello " + name
```
epicnumbers 1.1.0
A tool to convert numbers into various other formats and different sized integers
License: MIT
Requires Python: >=3.7,<4.0
Keywords: number,integer,conversion,cli

# epicnumbers

A small tool I often used to convert a number into various other formats

# Usage

```bash
$ pip install epicnumbers
```

```bash
$ epicnumbers <number>
```

# Examples

Convert -100 into signed, unsigned, hex, printable and binary in different sized integers
```
$ en -100
type      signed              unsigned  hex                  printable                         binary
------  --------  --------------------  -------------------  --------------------------------  -----------------------------------------------------------------------
8 bit       -100                   156  0x9c                 \x9c                              10011100
16 bit      -100                 65436  0xff9c               \x9c\xff                          11111111 10011100
32 bit      -100            4294967196  0xffffff9c           \x9c\xff\xff\xff                  11111111 11111111 11111111 10011100
64 bit      -100  18446744073709551516  0xffffffffffffff9cL  \x9c\xff\xff\xff\xff\xff\xff\xff  11111111 11111111 11111111 11111111 11111111 11111111 11111111 10011100
```

Convert 0x100 into signed, unsigned, hex, printable and binary in different sized integers
```
$ en 100h
type      signed    unsigned  hex    printable                         binary
------  --------  ----------  -----  --------------------------------  ----------
16 bit       256         256  0x100  \x00\x01                          1 00000000
32 bit       256         256  0x100  \x00\x01\x00\x00                  1 00000000
64 bit       256         256  0x100  \x00\x01\x00\x00\x00\x00\x00\x00  1 00000000
```

Convert 100b (binary) into signed, unsigned, hex, printable and binary in different sized integers
```
$ en 100b
type      signed    unsigned  hex    printable                           binary
------  --------  ----------  -----  --------------------------------  --------
8 bit          4           4  0x4    \x04                                   100
16 bit         4           4  0x4    \x04\x00                               100
32 bit         4           4  0x4    \x04\x00\x00\x00                       100
64 bit         4           4  0x4    \x04\x00\x00\x00\x00\x00\x00\x00       100
```

# Development

1. install [poetry](https://python-poetry.org/)
2. `$ poetry install`
3. `$ poetry shell`

## Run tests

```bash
$ poetry run pytest
```

## Run tool

```bash
$ poetry run en 100h
```