42
42
class GraphistryClient (AuthManagerProtocol ):
43
43
"""
44
44
Main Graphistry client class for API interactions.
45
+ ::
45
46
46
- ::
47
- # Import the GraphistryClient singleton
48
- import graphistry
47
+ # Import the GraphistryClient singleton
48
+ import graphistry
49
49
50
- graphistry.register(...)
50
+ graphistry.register(...)
51
51
52
- # Create a :py:class:`graphistry.plotter.Plotter`
53
- g = graphistry.bind(nodes=df_nodes, edges=df_edges)
54
- # Plot the graph
55
- g.plot()
52
+ # Create a :py:class:`graphistry.plotter.Plotter`
53
+ g = graphistry.bind(nodes=df_nodes, edges=df_edges)
54
+
55
+ g.plot()
56
56
57
57
58
58
Session Management:
@@ -64,15 +64,16 @@ class GraphistryClient(AuthManagerProtocol):
64
64
session state, so it's not safe for concurrent use across threads. For concurrent
65
65
or multi-tenant scenarios, create separate client instances using graphistry.client().
66
66
67
- ::
68
- import graphistry
69
-
70
- # Create independent client instances
71
- alice_g = graphistry.client()
72
- alice_g.register(api=3, username='alice', password='pw')
73
-
74
- bob_g = graphistry.client()
75
- bob_g.register(api=3, username='bob', password='pw')
67
+ Multiple clients:
68
+ ::
69
+
70
+ import graphistry
71
+ # Create independent client instances
72
+ alice_g = graphistry.client()
73
+ alice_g.register(api=3, username='alice', password='pw')
74
+
75
+ bob_g = graphistry.client()
76
+ bob_g.register(api=3, username='bob', password='pw')
76
77
77
78
78
79
Each client has its own isolated session (self.session) that tracks:
0 commit comments