Skip to content

Commit 273fecf

Browse files
committed
Updated README
1 parent 4bc0d82 commit 273fecf

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

README.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,20 @@ import tomllib
101101
import datetime
102102
from tomlval import TOMLValidator, TOMLSchema
103103

104-
# Load data
104+
# Load data from file
105105
path = pathlib.Path("data.toml")
106106

107107
with path.open("rb") as file:
108108
data = tomllib.load(file)
109109

110+
# Use a dictionary
111+
# data = {
112+
# "first_name": "John",
113+
# "last_name": "Doe",
114+
# "age": 25,
115+
# ...
116+
# }
117+
110118
# Define schema (optional)
111119
structure = {
112120
"first_name": str,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "tomlval"
3-
version = "1.0.3"
3+
version = "1.0.4"
44
description = "A simple and easy to use TOML validator for Python."
55
authors = [
66
{ name = "Marcus Fredriksson", email = "[email protected]" },

0 commit comments

Comments
 (0)