diff --git a/docs/doctrees/environment.pickle b/docs/doctrees/environment.pickle index 0f935a7cd..f9c5cd259 100644 Binary files a/docs/doctrees/environment.pickle and b/docs/doctrees/environment.pickle differ diff --git a/docs/doctrees/index.doctree b/docs/doctrees/index.doctree index e1bdc8ed0..560591bfc 100644 Binary files a/docs/doctrees/index.doctree and b/docs/doctrees/index.doctree differ diff --git a/docs/html/genindex.html b/docs/html/genindex.html index 18ea24d74..cf0530205 100644 --- a/docs/html/genindex.html +++ b/docs/html/genindex.html @@ -35,34 +35,13 @@

Index

- A - | C - | E + C | G | I | M - | Q - | R - | T | W
-

A

- - - -
-

C

    @@ -71,29 +50,15 @@

    C

-

E

- - -
-

G

@@ -102,6 +67,8 @@

G

I

@@ -130,30 +97,6 @@

M

-

Q

- - -
- -

R

- - -
- -

T

- - -
-

W

    diff --git a/docs/html/index.html b/docs/html/index.html index bb33eca48..1f42602cb 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -48,145 +48,9 @@ -
    -
    -query(gql_query)
    -
    -
    Allows to send simple graph QL string queries.

    To create more complex GQL queries please use a GQL python client. -Be cautious of injection risks when generating query strings.

    -
    -
    -
    -
    Parameters
    -

    gql_query (str) – A GQL query in form of a string

    -
    -
    Returns
    -

    Data response of the query

    -
    -
    Raises
    -

    TypeError: If parameter has the wrong type. -ConnectionError: if the network connection to weaviate fails. -UnexpectedStatusCodeException: if weaviate reports a none OK status.

    -
    -
    -
    - - - -
    -
    -class weaviate.batch.ActionsBatchRequest
    -

    Collect things for one batch request to weaviate. -Caution this batch will not be validated through weaviate.

    -
    -
    -add_action(action, class_name, uuid=None)
    -

    Add an action to this batch

    -
    -
    Parameters
    -
      -
    • action (dict) – that should be added as part of the batch.

    • -
    • class_name (str) – class of the action.

    • -
    • uuid (str) – if given the thing will be added under this uuid.

    • -
    -
    -
    Raises
    -

    TypeError, ValueError

    -
    -
    -
    - -
    -
    -get_request_body()
    -

    Get the request body as it is needed for weaviate

    -
    -
    Returns
    -

    the request body as a dict

    -
    -
    -
    - -
    - -
    -
    -class weaviate.batch.EntityBatchRequest
    -

    Base for storing entities

    -
    - -
    -
    -class weaviate.batch.ReferenceBatchRequest
    -

    Collect references to add them in one request to weaviate. -Caution this request will miss some validations to be faster.

    -
    -
    -add_reference(from_entity_uuid, from_entity_class_name, from_property_name, to_entity_uuid, from_semantic_type='things', to_semantic_type='things')
    -

    Add one reference to this batch

    -
    -
    Parameters
    -
      -
    • from_entity_uuid (str in form of UUID) – The UUID or URL of the thing that should reference another entity.

    • -
    • from_entity_class_name (str) – The name of the class that should reference another entity.

    • -
    • from_property_name (str) – The name of the property that contains the reference.

    • -
    • to_entity_uuid (str) – The UUID or URL of the thing that is actually referenced.

    • -
    • from_semantic_type (str) – Either things or actions. -Defaults to things. -Settable through the constants SEMANTIC_TYPE_THINGS and SEMANTIC_TYPE_ACTIONS

    • -
    • to_semantic_type (str) – Either things or actions. -Defaults to things. -Settable through the constants SEMANTIC_TYPE_THINGS and SEMANTIC_TYPE_ACTIONS

    • -
    -
    -
    Returns
    -

    None if successful

    -
    -
    Raises
    -

    TypeError: If arguments are not string.

    -
    -
    -
    -
    -
    -
    -class weaviate.batch.ThingsBatchRequest
    -

    Collect things for one batch request to weaviate. -Caution this batch will not be validated through weaviate.

    -
    -
    -add_thing(thing, class_name, uuid=None)
    -

    Add a thing to this batch

    -
    -
    Parameters
    -
      -
    • thing (dict) – that should be added as part of the batch.

    • -
    • class_name (str) – class of the thing.

    • -
    • uuid (str) – if given the thing will be added under this uuid.

    • -
    -
    -
    Raises
    -

    TypeError, ValueError

    -
    -
    -
    - -
    -
    -get_request_body()
    -

    Get the request body as it is needed for weaviate

    -
    -
    Returns
    -

    the request body as a dict

    -
    -
    -
    - -
    - -
    +
    weaviate.util.generate_local_beacon(to_uuid, semantic_type='things')

    Generates a beacon to the given schema class type with the given uuid.

    @@ -231,6 +95,23 @@
    +
    +
    +weaviate.util.is_object_url(input)
    +
    +
    Validates if an url like http://localhost:8080/v1/things/1c9cd584-88fe-5010-83d0-017cb3fcb446 references a thing.

    it only validates the path not the host or the protocol

    +
    +
    +
    +
    Parameters
    +

    input (str) –

    +
    +
    Returns
    +

    +
    +
    +
    +
    weaviate.util.is_semantic_type(semantic_type)
    diff --git a/docs/html/objects.inv b/docs/html/objects.inv index 947f1e19a..b776d5e5c 100644 Binary files a/docs/html/objects.inv and b/docs/html/objects.inv differ diff --git a/docs/html/searchindex.js b/docs/html/searchindex.js index 88c9bced0..50bef3ea0 100644 --- a/docs/html/searchindex.js +++ b/docs/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({docnames:["index"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst"],objects:{"weaviate.batch":{ActionsBatchRequest:[0,1,1,""],EntityBatchRequest:[0,1,1,""],ReferenceBatchRequest:[0,1,1,""],ThingsBatchRequest:[0,1,1,""]},"weaviate.batch.ActionsBatchRequest":{add_action:[0,2,1,""],get_request_body:[0,2,1,""]},"weaviate.batch.ReferenceBatchRequest":{add_reference:[0,2,1,""]},"weaviate.batch.ThingsBatchRequest":{add_thing:[0,2,1,""],get_request_body:[0,2,1,""]},"weaviate.client":{Client:[0,1,1,""]},"weaviate.client.Client":{is_reachable:[0,2,1,""],query:[0,2,1,""]},"weaviate.util":{generate_local_beacon:[0,3,1,""],get_domain_from_weaviate_url:[0,3,1,""],get_uuid_from_weaviate_url:[0,3,1,""],is_semantic_type:[0,3,1,""],is_weaviate_entity_url:[0,3,1,""]},weaviate:{batch:[0,0,0,"-"],client:[0,0,0,"-"],util:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"1b29db191a67":[],"28f3f61b":0,"2c1550bf73d2":0,"457f":[],"45e0":0,"9bbe":0,"case":[],"class":0,"default":0,"float":[],"new":[],"return":0,"true":0,The:0,abbrevi:[],accept:[],action:0,actions_batch_request:[],actionsbatchrequest:0,actual:0,add:0,add_act:0,add_refer:0,add_reference_to_th:[],add_references_in_batch:[],add_th:0,added:0,addit:[],against:[],all:[],allow:0,along:0,alreadi:[],also:[],anoth:0,argument:0,associ:[],attributeerror:[],auth_client_secret:0,b524:0,b727:[],base:0,batch:0,beacon:0,been:[],bodi:0,bool:0,c11y:[],camelcas:[],can:[],caution:0,cautiou:0,chang:[],check:0,class_nam:0,client_config:0,collect:0,combin:[],compar:[],complex:0,concept:[],connect:0,connectionerror:0,consist:[],constant:0,contain:0,contains_schema:[],convert:[],could:0,crate:[],creat:0,create_actions_in_batch:[],create_schema:[],create_things_in_batch:[],creation:[],cross:[],data:0,definit:[],delet:[],delete_refer:[],describ:[],dict:0,differ:[],direct:[],doe:[],domain:[],edg:[],either:0,empti:[],end:[],entiti:0,entitybatchrequest:0,equal:[],everi:[],except:[],exist:[],explicitli:[],extend:[],extend_c11i:[],f138:[],fail:0,fals:0,faster:0,fc7eb129:[],field:[],file:[],follow:0,form:0,format:[],from:[],from_entity_class_nam:0,from_entity_uuid:0,from_property_nam:0,from_semantic_typ:0,from_uuid:[],gener:0,generate_local_beacon:0,get:0,get_c11y_vector:[],get_domain_from_weaviate_url:0,get_request_bodi:0,get_schema:[],get_uuid_from_weaviate_url:0,given:0,gql:0,gql_queri:0,graph:0,guarani:[],has:0,have:[],identifi:[],ignor:[],includ:[],inconsist:[],index:0,influenc:[],inform:[],inject:0,input:0,instanc:[],instead:[],invalid:[],is_reach:0,is_semantic_typ:0,is_weaviate_entity_url:0,issu:[],its:[],json:[],keep:[],like:0,link:[],list:[],load:[],localhost:0,locat:[],mai:[],match:[],merg:[],meta:[],might:[],miss:0,modul:0,more:0,multipl:[],must:[],name:0,nativ:0,need:0,neither:[],network:0,none:0,nor:[],normal:0,old:[],onc:[],one:0,onli:[],other:[],otherwis:0,overwrit:[],page:0,paramet:0,part:0,patch:[],path:[],ping:0,plane:[],pleas:0,present:[],properli:[],properti:0,provid:[],put:[],queri:0,rais:0,reach:0,reason:[],refer:0,referenc:0,reference_batch_request:[],referencebatchrequest:0,remov:[],replac:[],report:0,represent:[],request:0,respons:0,result:[],retriev:[],risk:0,schema:0,schemavalidationexcept:[],search:0,see:[],semantic_typ:0,semantic_type_act:0,semantic_type_th:0,send:0,set:[],settabl:0,should:0,simpl:0,some:0,specif:[],specifi:[],standard:[],state:[],statu:0,still:[],store:0,str:0,string:0,subset:[],success:0,take:[],test:[],them:0,thi:0,thing:0,thingalreadyexistsexcept:[],things_batch_request:[],thingsbatchrequest:0,through:0,to_entity_uuid:0,to_semantic_typ:0,to_thing_uuid:[],to_uuid:0,to_weavi:[],to_wevi:[],type:0,typeerror:0,under:0,unexpectedstatuscodeexcept:0,unidirection:[],unset:[],updat:[],url:0,use:0,util:0,uuid:0,valid:0,valu:[],valueerror:0,vector:[],vector_weight:[],want:[],weavait:[],weavat:[],weight:[],when:0,which:[],within:[],word:[],wrong:0,you:[]},titles:["Welcome to weaviate-python-client\u2019s documentation!"],titleterms:{client:0,document:0,indic:0,python:0,tabl:0,weaviat:0,welcom:0}}) \ No newline at end of file +Search.setIndex({docnames:["index"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":2,"sphinx.domains.rst":2,"sphinx.domains.std":1,sphinx:56},filenames:["index.rst"],objects:{"weaviate.client":{Client:[0,1,1,""]},"weaviate.client.Client":{is_reachable:[0,2,1,""]},"weaviate.util":{generate_local_beacon:[0,3,1,""],get_domain_from_weaviate_url:[0,3,1,""],get_uuid_from_weaviate_url:[0,3,1,""],is_object_url:[0,3,1,""],is_semantic_type:[0,3,1,""],is_weaviate_entity_url:[0,3,1,""]},weaviate:{batch:[0,0,0,"-"],client:[0,0,0,"-"],util:[0,0,0,"-"]}},objnames:{"0":["py","module","Python module"],"1":["py","class","Python class"],"2":["py","method","Python method"],"3":["py","function","Python function"]},objtypes:{"0":"py:module","1":"py:class","2":"py:method","3":"py:function"},terms:{"017cb3fcb446":0,"1b29db191a67":[],"1c9cd584":0,"28f3f61b":0,"2c1550bf73d2":0,"457f":[],"45e0":0,"83d0":0,"88fe":0,"9bbe":0,"case":[],"class":0,"default":0,"float":[],"new":[],"return":0,"true":0,The:[],abbrevi:[],accept:[],action:0,actions_batch_request:[],actionsbatchrequest:[],actual:[],add:[],add_act:[],add_refer:[],add_reference_to_th:[],add_references_in_batch:[],add_th:[],added:[],addit:[],against:[],all:[],allow:[],along:0,alreadi:[],also:[],anoth:[],argument:[],associ:[],attributeerror:[],auth_client_secret:0,b524:0,b727:[],base:[],batch:[],beacon:0,been:[],bodi:[],bool:0,c11y:[],camelcas:[],can:[],caution:[],cautiou:[],chang:[],check:0,class_nam:[],client_config:0,collect:[],combin:[],compar:[],complex:[],concept:[],connect:[],connectionerror:[],consist:[],constant:0,contain:[],contains_schema:[],convert:[],could:0,crate:[],creat:[],create_actions_in_batch:[],create_schema:[],create_things_in_batch:[],creation:[],cross:[],data:[],definit:[],delet:[],delete_refer:[],describ:[],dict:[],differ:[],direct:[],doe:[],domain:[],edg:[],either:0,empti:[],end:[],entiti:[],entitybatchrequest:[],equal:[],everi:[],except:[],exist:[],explicitli:[],extend:[],extend_c11i:[],f138:[],fail:[],fals:0,faster:[],fc7eb129:[],field:[],file:[],follow:0,form:0,format:[],from:[],from_entity_class_nam:[],from_entity_uuid:[],from_property_nam:[],from_semantic_typ:[],from_uuid:[],gener:0,generate_local_beacon:0,get:[],get_c11y_vector:[],get_domain_from_weaviate_url:0,get_request_bodi:[],get_schema:[],get_uuid_from_weaviate_url:0,given:0,gql:[],gql_queri:[],graph:[],guarani:[],has:[],have:[],host:0,http:0,identifi:[],ignor:[],includ:[],inconsist:[],index:0,influenc:[],inform:[],inject:[],input:0,instanc:[],instead:[],invalid:[],is_object_url:0,is_reach:0,is_semantic_typ:0,is_weaviate_entity_url:0,issu:[],its:[],json:[],keep:[],like:0,link:[],list:[],load:[],localhost:0,locat:[],mai:[],match:[],merg:[],meta:[],might:[],miss:[],modul:0,more:[],multipl:[],must:[],name:[],nativ:0,need:[],neither:[],network:[],none:0,nor:[],normal:0,old:[],onc:[],one:[],onli:0,other:[],otherwis:0,overwrit:[],page:0,paramet:0,part:[],patch:[],path:0,ping:0,plane:[],pleas:[],present:[],properli:[],properti:[],protocol:0,provid:[],put:[],queri:[],rais:0,reach:0,reason:[],refer:0,referenc:[],reference_batch_request:[],referencebatchrequest:[],remov:[],replac:[],report:[],represent:[],request:[],respons:[],result:[],retriev:[],risk:[],schema:0,schemavalidationexcept:[],search:0,see:[],semantic_typ:0,semantic_type_act:0,semantic_type_th:0,send:[],set:[],settabl:0,should:[],simpl:[],some:[],specif:[],specifi:[],standard:[],state:[],statu:[],still:[],store:[],str:0,string:[],subset:[],success:[],take:[],test:[],them:[],thi:0,thing:0,thingalreadyexistsexcept:[],things_batch_request:[],thingsbatchrequest:[],through:0,to_entity_uuid:[],to_semantic_typ:[],to_thing_uuid:[],to_uuid:0,to_weavi:[],to_wevi:[],type:0,typeerror:0,under:[],unexpectedstatuscodeexcept:[],unidirection:[],unset:[],updat:[],url:0,use:[],util:0,uuid:0,valid:0,valu:[],valueerror:[],vector:[],vector_weight:[],want:[],weavait:[],weavat:[],weight:[],when:[],which:[],within:[],word:[],wrong:[],you:[]},titles:["Welcome to weaviate-python-client\u2019s documentation!"],titleterms:{client:0,document:0,indic:0,python:0,tabl:0,weaviat:0,welcom:0}}) \ No newline at end of file diff --git a/setup.py b/setup.py index d8254e091..b84d700fe 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ long_description = f.read() setup(name="weaviate-client", - version="0.4.2rc0", # 0.3.6rc0 + version="1.0.0rc0", # 0.3.6rc0 description="A python native weaviate client", long_description=long_description, long_description_content_type='text/markdown', diff --git a/weaviate/client.py b/weaviate/client.py index 69e7b6013..75ddde5b0 100644 --- a/weaviate/client.py +++ b/weaviate/client.py @@ -8,6 +8,7 @@ from .client_config import ClientConfig from requests.exceptions import ConnectionError + class Client: """ A python native weaviate client """