We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1f4831f + 5d2b064 commit 9a9dc82Copy full SHA for 9a9dc82
ipfsApi/client.py
@@ -8,6 +8,9 @@
8
FileCommand
9
from .exceptions import InvalidCommand
10
11
+default_host = 'localhost'
12
+default_port = 5001
13
+default_base = 'api/v0'
14
15
16
class Client(object):
@@ -16,11 +19,18 @@ class Client(object):
19
17
20
18
21
def __init__(self,
- host='127.0.0.1',
- port=5001,
- base='api/v0',
22
+ host=None,
23
+ port=None,
24
+ base=None,
25
default_enc='json',
26
**defaults):
27
+
28
+ if host is None:
29
+ host = default_host
30
+ if port is None:
31
+ port = default_port
32
+ if base is None:
33
+ base = default_base
34
35
self._client = self.__client__(host, port, base, default_enc)
36
0 commit comments