mirror of
https://github.com/arabianq/viking-file-python.git
synced 2026-04-28 06:21:24 +00:00
update README
This commit is contained in:
@@ -41,6 +41,14 @@ client = VikingClient(user_hash="YOUR_USER_HASH") # Replace with your actual us
|
|||||||
|
|
||||||
# Asynchronous client
|
# Asynchronous client
|
||||||
async_client = AsyncVikingClient(user_hash="YOUR_USER_HASH") # Replace with your actual user hash
|
async_client = AsyncVikingClient(user_hash="YOUR_USER_HASH") # Replace with your actual user hash
|
||||||
|
|
||||||
|
# also you can use context manager both synchronous and asynchronous
|
||||||
|
|
||||||
|
# with VikingClient(user_hash="YOUR_USER_HASH") as client:
|
||||||
|
# Your code here
|
||||||
|
|
||||||
|
# async with AsyncVikingClient(user_hash="YOUR_USER_HASH") as async_client:
|
||||||
|
# Your asynchronous code here
|
||||||
```
|
```
|
||||||
|
|
||||||
### Uploading a Local File (Synchronous)
|
### Uploading a Local File (Synchronous)
|
||||||
@@ -217,7 +225,6 @@ async def get_file_information():
|
|||||||
file = await client.get_file(file_hash)
|
file = await client.get_file(file_hash)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
asyncio.run(get_file_information())
|
asyncio.run(get_file_information())
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user