-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Allow examples to upload to other locations * Add progress bar to uploads * Initial core setup for multipart uploads * make this 💩 work * 🤨 tqdm this
- Loading branch information
Showing
20 changed files
with
520 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
""" | ||
A simple command-line utility for uploading files | ||
to the example hippo server running at 127.0.0.1:8000. | ||
""" | ||
|
||
import os | ||
|
||
from hippoclient import Client | ||
from hippoclient.collections import delete | ||
|
||
API_KEY = os.getenv("HIPPO_API_KEY") | ||
SERVER_LOCATION = os.getenv("HIPPO_HOST") | ||
|
||
if API_KEY is None: | ||
API_KEY = "TEST_API_KEY" | ||
SERVER_LOCATION = "http://127.0.0.1:8000" | ||
|
||
|
||
if __name__ == "__main__": | ||
import argparse | ||
|
||
parser = argparse.ArgumentParser( | ||
description="""Delete a product from the example hippo server.""", | ||
) | ||
parser.add_argument("id", help="The id of the product to delete") | ||
|
||
args = parser.parse_args() | ||
|
||
client = Client(api_key=API_KEY, host=SERVER_LOCATION) | ||
print(SERVER_LOCATION) | ||
|
||
delete(client=client, id=args.id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.