add opts to example in readme and __main__
This commit is contained in:
onyx-and-iris 2022-06-16 16:45:08 +01:00
parent d4be587e99
commit 5703105980
3 changed files with 13 additions and 5 deletions

View File

@ -70,7 +70,7 @@ class ManyThings:
def main(): def main():
with vban_cmd.api(kind_id) as vban: with vban_cmd.api(kind_id, **opts) as vban:
do = ManyThings(vban) do = ManyThings(vban)
do.things() do.things()
do.other_things() do.other_things()
@ -86,7 +86,11 @@ def main():
if __name__ == "__main__": if __name__ == "__main__":
kind_id = "banana" kind_id = "banana"
ip = "<ip address>" opts = {
"ip": "<ip address>",
"streamname": "Command1",
"port": 6980,
}
main() main()
``` ```

View File

@ -23,7 +23,7 @@ class ManyThings:
def main(): def main():
with vban_cmd.api(kind_id) as vban: with vban_cmd.api(kind_id, **opts) as vban:
do = ManyThings(vban) do = ManyThings(vban)
do.things() do.things()
do.other_things() do.other_things()
@ -42,6 +42,10 @@ def main():
if __name__ == "__main__": if __name__ == "__main__":
kind_id = "banana" kind_id = "banana"
ip = "<ip address>" opts = {
"ip": "<ip address>",
"streamname": "Command1",
"port": 6980,
}
main() main()

View File

@ -1,6 +1,6 @@
[tool.poetry] [tool.poetry]
name = "vban-cmd" name = "vban-cmd"
version = "1.0.1" version = "1.0.3"
description = "Python interface for the VBAN RT Packet Service (Sendtext)" description = "Python interface for the VBAN RT Packet Service (Sendtext)"
authors = ["onyx-and-iris <code@onyxandiris.online>"] authors = ["onyx-and-iris <code@onyxandiris.online>"]
license = "MIT" license = "MIT"