semvec/pypi-packages huggingface dataset:
bakelite 0.3.0
A utility that makes it simple to communicate with your firmware.
License: MIT
Requires Python: >=3.8,<4.0

# Bakelite

[![Tests](https://github.com/brendan0powers/bakelite/actions/workflows/test.yaml/badge.svg)](https://github.com/brendan0powers/bakelite/actions/workflows/test.yaml)
[![Lint](https://github.com/brendan0powers/bakelite/actions/workflows/lint.yaml/badge.svg)](https://github.com/brendan0powers/bakelite/actions/workflows/lint.yaml)
[![Documentation Status](https://readthedocs.org/projects/bakelite/badge/?version=latest)](https://bakelite.readthedocs.io/en/latest/?badge=latest)


[Documentation](https://bakelite.readthedocs.io/en/latest/) | 
[Protocol Spec](https://bakelite.readthedocs.io/en/latest/protocol/) |
[Arduino Example](https://github.com/brendan0powers/bakelite/tree/master/examples/arduino)

<hr/>

Bakelite is a utility that makes it simple to communicate with your firmware.
Bakelite uses a code generator to automate the tedious process of hand-building your own protocol.
It includes features like framing, error detection, and a lightweight C++ implementation suitable for small microcontrollers.



## Features
* Compact, easy to understand data serialization format
* Simple message passing
* Built in framing and error detection
* Easy to integrate with Serial, USB, TCP, I2C, etc...
* Use only the parts you need
* Code generators for:
    * C++ (header only, no STL or memory allocation)
    * Python

A more formal overview of the protocol can be found
[here](./docs/protocol.md), and examples can be found [here](./examples).

## Status
This project is in early development. The C++ implementation is currently WIP.
The API and data format are not stable, and will change without notice.

## How Does it Work?
![Overview](docs/img/overview.svg)
You start by creating a protocol definition file that describes the messages and fields you'd like to send. It also includes information about the protocol itself, like what kind of framing to use and the maximum message length.

Here's an example:
```proto
struct TestMessage {
  message: string[128]
}

struct Ack {
  code: uint8
}

protocol {
  maxLength = 256
  framing = COBS
  crc = CRC8

  messageIds {
    TestMessage = 1
    Ack = 2
  }
}
```

Now that you've created the definition file, we can generate some code:
```bash
bakelite gen -l python -i my_proto.bakelite -o my_proto.py
```

And then use it to send a message over a serial port:
```python3
from proto import Protocol, TestMessage, Ack
import serial

# Open a serial port and send an Ack message
with serial.Serial(':COM1', 9600) as port:
  proto = Protocol(stream=port)
  proto.send(Ack(code=123))
```

Message serialization, framing, and error detection are all taken care of.
If you need something more customized, you can use any of the components independently.
Drop-in your own CRC algorithm, use the framer with your own message format, or just use the serializer on its own.

For a more complete example, have a look at the [Python/Arduino Example](./examples/arduino).
wyylde-sdk 1.3.8
Wyylde SDK
License: MIT
Requires Python: >=3.7,<4.0

# Wyylde SDK

[![PyPI](https://img.shields.io/pypi/v/wyylde-sdk.svg)][pypi status]
[![Status](https://img.shields.io/pypi/status/wyylde-sdk.svg)][pypi status]
[![Python Version](https://img.shields.io/pypi/pyversions/wyylde-sdk)][pypi status]
[![License](https://img.shields.io/pypi/l/wyylde-sdk)][license]

[![Read the documentation at https://wyylde-sdk.readthedocs.io/](https://img.shields.io/readthedocs/wyylde-sdk/latest.svg?label=Read%20the%20Docs)][read the docs]
[![Tests](https://github.com/Dogeek/wyylde-sdk/workflows/Tests/badge.svg)][tests]
[![Codecov](https://codecov.io/gh/Dogeek/wyylde-sdk/branch/main/graph/badge.svg)][codecov]

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi status]: https://pypi.org/project/wyylde-sdk/
[read the docs]: https://wyylde-sdk.readthedocs.io/
[tests]: https://github.com/Dogeek/wyylde-sdk/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/Dogeek/wyylde-sdk
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black

## Features

- TODO

## Requirements

- TODO

## Installation

You can install _Wyylde SDK_ via [pip] from [PyPI]:

```console
$ pip install wyylde-sdk
```

## Usage

Please see the [Command-line Reference] for details.

## Contributing

Contributions are very welcome.
To learn more, see the [Contributor Guide].

## License

Distributed under the terms of the [MIT license][license],
_Wyylde SDK_ is free and open source software.

## Issues

If you encounter any problems,
please [file an issue] along with a detailed description.

## Credits

This project was generated from [@cjolowicz]'s [Hypermodern Python Cookiecutter] template.

[@cjolowicz]: https://github.com/cjolowicz
[pypi]: https://pypi.org/
[hypermodern python cookiecutter]: https://github.com/cjolowicz/cookiecutter-hypermodern-python
[file an issue]: https://github.com/Dogeek/wyylde-sdk/issues
[pip]: https://pip.pypa.io/

<!-- github-only -->

[license]: https://github.com/Dogeek/wyylde-sdk/blob/main/LICENSE
[contributor guide]: https://github.com/Dogeek/wyylde-sdk/blob/main/CONTRIBUTING.md
[command-line reference]: https://wyylde-sdk.readthedocs.io/en/latest/usage.html