Skip to content

Commit

Permalink
Updated documentation for how to use set_credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
ogolovatyi authored and ogolovatyi committed Apr 4, 2019
1 parent d3a8722 commit 22043bd
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ or npm [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli).
TOC for markdown file is built with [markdown-toc](https://www.npmjs.com/package/markdown-toc):

```sh
markdownlint -i docs/server-startup.md
markdown-toc -i docs/server-startup.md
```

## TabPy with Swagger
Expand Down
14 changes: 14 additions & 0 deletions docs/server-config.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# TabPy Server Configuration Instructions

<!-- markdownlint-disable MD004 -->
<!-- toc -->

- [Configuring HTTP vs HTTPS](#configuring-http-vs-https)
- [Authentication](#authentication)
* [Enabling Authentication](#enabling-authentication)
* [Password File](#password-file)
* [Adding an Account](#adding-an-account)
* [Updating an Account](#updating-an-account)
* [Deleting an Account](#deleting-an-account)

<!-- tocstop -->
<!-- markdownlint-enable MD004 -->

Default settings for TabPy may be viewed in the
tabpy_server/common/default.conf file. This file also contains a
commented example of how to set up your TabPy server to only
Expand Down
21 changes: 21 additions & 0 deletions docs/tabpy-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on TabPy server.
<!-- toc -->

- [Connecting to TabPy](#connecting-to-tabpy)
- [Authentication](#authentication)
- [Deploying a Function](#deploying-a-function)
- [Providing Schema Metadata](#providing-schema-metadata)
- [Querying an Endpoint](#querying-an-endpoint)
Expand All @@ -30,6 +31,26 @@ The URL and port are where the Tableau-Python-Server process has been started -
more info can be found in the
[server section](server-startup.md#Command-Line-Arguments) of the documentation.

## Authentication

When TabPy is configured with authentication feature on client code
has to specify credential to use during model deployment with
`set_credentials` call for a client:

```python

client.set_credentials('username', 'P@ssw0rd')

```

Credentials only need to be set once for all futher client operations.

In case credentials are not provided when required deployment will
fail with "Unauthorized" code (401).

For how to configure and enable authentication feature for TabPy see
[TabPy Server Configuration Instructions](server-config.md).

## Deploying a Function

A persisted endpoint is backed by a Python method. For example:
Expand Down

0 comments on commit 22043bd

Please sign in to comment.