You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-13Lines changed: 24 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,26 +9,37 @@ $ pip install labkey
9
9
```
10
10
11
11
# Credentials
12
-
In order to the use the Python client API for LabKey Server, you will need to specify your login credentials in a credential file. The package assumes that this file will be located either:
12
+
The api no longer supports using a ``.labkeycredentials.txt`` file, and now uses the .netrc files similar to the other labkey apis. Additional .netrc [setup instructions](https://www.labkey.org/wiki/Staff/steveh/DocsSandbox/page.view?name=netrc&_docid=wiki%3Ae780ab5b-241e-1033-93dd-22a830bccfbb) can be found at the link.
13
13
14
-
1.``$HOME/.labkeycredentials.txt``
15
-
2. The location will be specified in the ``LABKEY_CREDENTIALS`` environment variable.
14
+
## Set Up a netrc File
16
15
17
-
The ``labkeycredentials`` file must be in the following format. (3 separate lines):
16
+
On a Mac, UNIX, or Linux system the netrc file should be named ``.netrc`` (dot netrc) and on Windows it should be named ``_netrc`` (underscore netrc). The file should be located in your home directory and the permissions on the file must be set so that you are the only user who can read it, i.e. it is unreadable to everyone else.
17
+
18
+
To create the netrc on a Windows machine, first create an environment variable called ’HOME’ that is set to your home directory (c:/Users/<User-Name> on Vista or Windows 7) or any directory you want to use.
19
+
20
+
In that directory, create a text file with the prefix appropriate to your system, either an underscore or dot.
21
+
22
+
The following three lines must be included in the file. The lines must be separated by either white space (spaces, tabs, or newlines) or commas:
18
23
```
19
-
machine https://hosted.labkey.com
20
-
login labkeypython@gmail.com
21
-
password python
24
+
machine <remote-instance-of-labkey-server>
25
+
login <user-email>
26
+
password <user-password>
22
27
```
23
-
where:
24
-
- machine: URL of your LabKey Server
25
-
- login: email address to be used to login to the LabKey Server
26
-
- password: password associated with the login
27
28
28
-
A sample ``labkeycredentials`` file has been shipped with the source and named ``.labkeycredentials.sample``.
0 commit comments