Skip to content

Commit ec07d9d

Browse files
committed
capitalize Bydantic
1 parent f68ca91 commit ec07d9d

6 files changed

Lines changed: 36 additions & 36 deletions

File tree

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,31 @@
1-
# bydantic
1+
# Bydantic
22

33
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
44
![PyPI - Version](https://img.shields.io/pypi/v/bydantic)
55
![PyPI - Downloads](https://img.shields.io/pypi/dm/bydantic)
66

7-
`bydantic` is a Python library for serializing and deserializing bitfields.
8-
bydantic allows you to declaratively define bitfields as Python classes with
7+
`Bydantic` is a Python library for serializing and deserializing bitfields.
8+
Bydantic allows you to declaratively define bitfields as Python classes with
99
type hints, which then can be automatically serialized and deserialized to and
1010
from raw bytes.
1111

12-
The name bydantic is a portmanteau of "bit" and "pydantic" -- just as
13-
[pydantic](https://docs.pydantic.dev) gives developers a way to declaratively
12+
The name Bydantic is a portmanteau of "bit" and "Pydantic" -- just as
13+
[Pydantic](https://docs.pydantic.dev) gives developers a way to declaratively
1414
define data models with type hints and then serialize and deserialize raw
15-
objects against those models, bydantic gives developers a way to do the same
15+
objects against those models, Bydantic gives developers a way to do the same
1616
with bitfields.
1717

1818
## Installation
1919

20-
bydantic is available on PyPI and can be installed using `pip`:
20+
Bydantic is available on PyPI and can be installed using `pip`:
2121

2222
```bash
2323
pip install bydantic
2424
```
2525

2626
## Quick Start
2727

28-
Here's a simple example of how bydantic can be used:
28+
Here's a simple example of how Bydantic can be used:
2929

3030
```python
3131
import bydantic as bd
@@ -67,7 +67,7 @@ foo2 = Foo.from_bytes_exact(b'\x34y')
6767
print(foo2) # Foo(a=3, b=4, c='y')
6868
```
6969

70-
The power of bydantic, however, is that field types can be composed into complex
70+
The power of Bydantic, however, is that field types can be composed into complex
7171
data structures. For example:
7272

7373
```python
@@ -97,7 +97,7 @@ bar2 = Bar.from_bytes_exact(b'\x01x#y*')
9797
print(bar2) # Bar(d=[Foo(a=0, b=1, c='x'), Foo(a=2, b=3, c='y')], e=42)
9898
```
9999

100-
This just scratches the surface of what bydantic can do... continue reading
100+
This just scratches the surface of what Bydantic can do... continue reading
101101
[the docs](https://kylehusmann.com/bydantic/getting-started) for more info.
102102

103103
## Features
@@ -112,7 +112,7 @@ This just scratches the surface of what bydantic can do... continue reading
112112

113113
## Related Projects
114114

115-
- [pydantic](https://docs.pydantic.dev)
115+
- [Pydantic](https://docs.pydantic.dev)
116116

117117
- [bitproto](https://bitproto.readthedocs.io/)
118118

docs/complex-data-structures.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ context to inform `dynamic_field` discriminators. But this is somewhat of an
362362
advanced feature, and not necessary to use the library.
363363

364364
This completes our tour of the field types and combinators available in
365-
bydantic. Congratulations, now you can define bitfields like a pro!
365+
Bydantic. Congratulations, now you can define bitfields like a pro!
366366

367367
For quick reference of field types and capabilities of the `Bitfield` class, you
368368
can check out the [Field Type Reference](field-type-reference.md) and

docs/getting-started.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ packet-beta
2323
15: "sensor_error"
2424
```
2525

26-
Without a library like bydantic, parsing this information would require manual
26+
Without a library like Bydantic, parsing this information would require manual
2727
bit manipulation and byte handling. For example, you might do something like
2828
this:
2929

@@ -91,15 +91,15 @@ encode_weather_data(-1, 63, 7, True) # b'\xFF\xFF'
9191
```
9292

9393
This is a lot of boilerplate code to write and maintain, especially if you have
94-
multiple fields or more complex data structures. This is where bydantic comes
94+
multiple fields or more complex data structures. This is where Bydantic comes
9595
in.
9696

97-
## Using bydantic
97+
## Using Bydantic
9898

99-
With bydantic, we can declaratively define the structure of our protocol using
99+
With Bydantic, we can declaratively define the structure of our protocol using
100100
Python classes and type hints, and then you get serialization / deserialization
101101
methods for free. Here's how we would define the same weather data structure
102-
using bydantic:
102+
using Bydantic:
103103

104104
```python
105105
import bydantic as bd
@@ -164,7 +164,7 @@ WeatherPacket(
164164

165165
As you can see, everything "just works".
166166

167-
In addition to the field types demonstrated above, bydantic supports a variety
167+
In addition to the field types demonstrated above, Bydantic supports a variety
168168
of other primitive field types, including fields for `bytes` and `str` values.
169169
These field types can be composed into more complex data structures using
170170
combinators like `list_field`, `mapped_field`, and `dynamic_field`, which will
@@ -235,7 +235,7 @@ while True:
235235

236236
## Next Steps
237237

238-
As you can see, bydantic makes it easy to define and work with binary protocols
238+
As you can see, Bydantic makes it easy to define and work with binary protocols
239239
in Python. It provides a simple and declarative way to define bitfields, and
240240
handles serialization and deserialization for you.
241241

docs/global-context.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ this feature should probably be used sparingly. If you find yourself using a lot
138138
of global context, it may be a sign that you should consider making a separate
139139
bitfield type for each configuration.
140140

141-
Global context is a newer feature in bydantic, so I would love to hear how you
141+
Global context is a newer feature in Bydantic, so I would love to hear how you
142142
are using it (or not using it) in your projects. If you have any feedback or
143143
ideas, I'd love to hear from you! You can reach me at
144144
[bydantic@kylehusmann.com](mailto: bydantic@kylehusmann.com).

docs/index.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,37 @@
11
---
2-
title: Welcome to bydantic
2+
title: Welcome to Bydantic
33
---
44

55
<!-- BEGIN CONTENT -->
66

7-
# bydantic
7+
# Bydantic
88

99
[![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active)
1010
![PyPI - Version](https://img.shields.io/pypi/v/bydantic)
1111
![PyPI - Downloads](https://img.shields.io/pypi/dm/bydantic)
1212

13-
`bydantic` is a Python library for serializing and deserializing bitfields.
14-
bydantic allows you to declaratively define bitfields as Python classes with
13+
`Bydantic` is a Python library for serializing and deserializing bitfields.
14+
Bydantic allows you to declaratively define bitfields as Python classes with
1515
type hints, which then can be automatically serialized and deserialized to and
1616
from raw bytes.
1717

18-
The name bydantic is a portmanteau of "bit" and "pydantic" -- just as
19-
[pydantic](https://docs.pydantic.dev) gives developers a way to declaratively
18+
The name Bydantic is a portmanteau of "bit" and "Pydantic" -- just as
19+
[Pydantic](https://docs.pydantic.dev) gives developers a way to declaratively
2020
define data models with type hints and then serialize and deserialize raw
21-
objects against those models, bydantic gives developers a way to do the same
21+
objects against those models, Bydantic gives developers a way to do the same
2222
with bitfields.
2323

2424
## Installation
2525

26-
bydantic is available on PyPI and can be installed using `pip`:
26+
Bydantic is available on PyPI and can be installed using `pip`:
2727

2828
```bash
2929
pip install bydantic
3030
```
3131

3232
## Quick Start
3333

34-
Here's a simple example of how bydantic can be used:
34+
Here's a simple example of how Bydantic can be used:
3535

3636
```python
3737
import bydantic as bd
@@ -73,7 +73,7 @@ foo2 = Foo.from_bytes_exact(b'\x34y')
7373
print(foo2) # Foo(a=3, b=4, c='y')
7474
```
7575

76-
The power of bydantic, however, is that field types can be composed into complex
76+
The power of Bydantic, however, is that field types can be composed into complex
7777
data structures. For example:
7878

7979
```python
@@ -103,7 +103,7 @@ bar2 = Bar.from_bytes_exact(b'\x01x#y*')
103103
print(bar2) # Bar(d=[Foo(a=0, b=1, c='x'), Foo(a=2, b=3, c='y')], e=42)
104104
```
105105

106-
This just scratches the surface of what bydantic can do... continue reading
106+
This just scratches the surface of what Bydantic can do... continue reading
107107
[the docs](https://kylehusmann.com/bydantic/getting-started) for more info.
108108

109109
## Features
@@ -118,7 +118,7 @@ This just scratches the surface of what bydantic can do... continue reading
118118

119119
## Related Projects
120120

121-
- [pydantic](https://docs.pydantic.dev)
121+
- [Pydantic](https://docs.pydantic.dev)
122122

123123
- [bitproto](https://bitproto.readthedocs.io/)
124124

docs/more-field-types.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ as follows:
1616
| 123 | Sensor Error | bool (1) | Sensor error flag (1 = error) |
1717
| 124-127 | (Pad) | uint (4) | Padding bits, always `0` |
1818

19-
With bydantic, definition can be translated into a Bitfield class that looks
19+
With Bydantic, definition can be translated into a Bitfield class that looks
2020
like this:
2121

2222
```python
@@ -100,10 +100,10 @@ default value in the definition to indicate the field is private and not
100100
necessary to provide when creating a new instance of the class.
101101

102102
In addition to `lit_bytes_field()`, other literal field types available in
103-
bydantic include `lit_uint_field`, `lit_int_field`, and `lit_str_field`.
103+
Bydantic include `lit_uint_field`, `lit_int_field`, and `lit_str_field`.
104104

105105
Because the size of a literal `bytes` or `str` field can be inferred from the
106-
literal value, bydantic allows you to omit the `lit_bytes_field()` or
106+
literal value, Bydantic allows you to omit the `lit_bytes_field()` or
107107
`lit_str_field()` call and simply use the value itself. So the following is
108108
equivalent to the above definition of `_header`:
109109

@@ -172,7 +172,7 @@ class ValueMapper(t.Protocol[T, P]):
172172
...
173173
```
174174

175-
Here, we're using `Scale`, a built-in `ValueMapper` defined in bydantic as
175+
Here, we're using `Scale`, a built-in `ValueMapper` defined in Bydantic as
176176
follows:
177177

178178
```python

0 commit comments

Comments
 (0)