Skip to content

update readme print statements to Python 3 #119

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 6, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,9 @@ If the algorithm output is text, then the `result` field of the response will be
```python
algo = client.algo('demo/Hello/0.1.1')
response = algo.pipe("HAL 9000")
print response.result # Hello, world!
print response.metadata # Metadata(content_type='text',duration=0.0002127)
print response.metadata.duration # 0.0002127
print(response.result) # Hello, world!
print(response.metadata) # Metadata(content_type='text',duration=0.0002127)
print(response.metadata.duration) # 0.0002127
```

### JSON input/output
Expand Down Expand Up @@ -119,7 +119,7 @@ This includes support for changing the timeout or indicating that the API should
```python
from Algorithmia.algorithm import OutputType
response = client.algo('util/echo').set_options(timeout=60, stdout=False)
print response.metadata.stdout
print(response.metadata.stdout)
```

Note: `stdout=True` is only supported if you have access to the algorithm source.
Expand Down Expand Up @@ -186,15 +186,15 @@ foo = client.dir("data://.my/foo")

# List files in "foo"
for file in foo.files():
print file.path + " at URL: " + file.url + " last modified " + file.last_modified
print(file.path + " at URL: " + file.url + " last modified " + file.last_modified)

# List directories in "foo"
for file in foo.dirs():
print dir.path + " at URL: " + file.url
print(dir.path + " at URL: " + file.url)

# List everything in "foo"
for entry in foo.list():
print entry.path + " at URL: " + entry.url
print(entry.path + " at URL: " + entry.url)
```

### Manage directory permissions
Expand Down Expand Up @@ -230,7 +230,7 @@ $ algo auth
Configuring authentication for profile: 'default'
Enter API Endpoint [https://api.algorithmia.com]:
Enter API Key:
(optional) enter path to custom CA certificate:
(optional) enter path to custom CA certificate:
Profile is ready to use. Test with 'algo ls'
```

Expand Down Expand Up @@ -332,7 +332,7 @@ algo auth --profile second_user
Configuring authentication for profile: 'second_user'
Enter API Endpoint [https://api.algorithmia.com]:
Enter API Key:
(optional) enter path to custom CA certificate:
(optional) enter path to custom CA certificate:
```

Now you may use `algo ls --profile second_user` to list files in your `second_user` account. For more information, see the auth command help with `algo auth --help`.
Expand All @@ -342,7 +342,7 @@ Now you may use `algo ls --profile second_user` to list files in your `second_us
When running commands, the Algorithmia CLI will use the default profile unless otherwise specified with the `--profile <profile>` option. See the following example:

```text
$ algo run kenny/factor -d 17 --profile second_user
$ algo run kenny/factor -d 17 --profile second_user
[17]
```

Expand Down