MCPcopy Create free account
hub / github.com/Bytez-com/docs / __init__

Method __init__

sdk/python/bytez/client.py:14–26  ·  view source on GitHub ↗

Initialize the client with an API key. Args: api_key (str): Your Bytez API key.

( self, api_key, dev = False )

Source from the content-addressed store, hash-verified

12 """
13
14 def __init__( self, api_key, dev = False ):
15 """
16 Initialize the client with an API key.
17
18 Args:
19 api_key (str): Your Bytez API key.
20 """
21 self.headers = {
22 "lang": "python",
23 "authorization": f"Key {api_key}",
24 "content-type": "application/json",
25 }
26 self.host = f"http{'://' if dev else 's://'}{'localhost:8080' if dev else 'api.bytez.com'}/models/v2/"
27 def request(self, path = "", method = "GET", post_body = None, provider_key = None):
28 """
29 Send an HTTP request.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected