mirror of
https://gitlab.com/fabinfra/fabaccess/pyfabapi.git
synced 2025-03-12 14:51:42 +01:00
Add raw data example
This commit is contained in:
parent
acdd150079
commit
2383a6cc0d
15
raw-write.py
Normal file
15
raw-write.py
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
import asyncio
|
||||||
|
import fabapi
|
||||||
|
import fabapi.user_system
|
||||||
|
|
||||||
|
async def main():
|
||||||
|
session = await fabapi.connect("localhost", 59661, "Testuser", "secret")
|
||||||
|
ma = await session.machineSystem.info.getMachineURN("urn:fabaccess:resource:Another").a_wait()
|
||||||
|
await ma.just.use.use().a_wait()
|
||||||
|
|
||||||
|
ma = await session.machineSystem.info.getMachineURN("urn:fabaccess:resource:Another").a_wait()
|
||||||
|
await ma.just.inuse.sendRawData(b"FooBarData").a_wait()
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
loop = asyncio.get_event_loop()
|
||||||
|
loop.run_until_complete(main())
|
Loading…
x
Reference in New Issue
Block a user