index
int64
0
731k
package
stringlengths
2
98
name
stringlengths
1
76
docstring
stringlengths
0
281k
code
stringlengths
4
8.19k
signature
stringlengths
2
42.8k
embed_func_code
listlengths
768
768
4,090
springserve._demand
_SpotxConnectAPI
null
class _SpotxConnectAPI(_VDAPIService): __RESPONSE_OBJECT__ = _DemandTagResponse __API__ = "spotx_connects"
()
[ -0.0031525008380413055, -0.11415761709213257, -0.04554436355829239, -0.01869247481226921, -0.0011335094459354877, 0.010282715782523155, -0.013713378459215164, 0.04528474807739258, 0.047918014228343964, -0.009142252616584301, -0.018284505233168602, -0.006152012851089239, 0.03478877246379852, ...
4,103
springserve._supply
_SupplyLabelAPI
null
class _SupplyLabelAPI(_VDAPIService): __API__ = "supply_labels"
()
[ 0.003036889713257551, -0.0987931340932846, -0.0533931665122509, -0.022787628695368767, -0.027765847742557526, -0.007471712771803141, 0.011534045450389385, 0.0022875273134559393, 0.07397214323282242, -0.05051841959357262, -0.05837138742208481, -0.0470476858317852, 0.03607456758618355, -0.03...
4,116
springserve._supply
_SupplyPartnerAPI
null
class _SupplyPartnerAPI(_VDAPIService): __API__ = "supply_partners"
()
[ -0.02190222218632698, -0.055931515991687775, -0.05431457236409187, 0.01286204345524311, -0.011410470120608807, -0.03085053153336048, 0.025889456272125244, 0.003380879992619157, 0.023647787049412727, -0.007675883825868368, -0.01351433340460062, -0.04858177527785301, -0.001264384831301868, -...
4,129
springserve._supply
_SupplyRouterAPI
null
class _SupplyRouterAPI(_VDAPIService): __API__ = "supply_routers"
()
[ -0.008163455873727798, -0.026276981458067894, -0.03534748777747154, -0.030766425654292107, 0.0005394202889874578, -0.016097858548164368, -0.006578407716006041, 0.003344176569953561, 0.011278579011559486, -0.013477490283548832, -0.02774292230606079, -0.0388474203646183, 0.01435705367475748, ...
4,142
springserve._supply
_SupplyTagAPI
null
class _SupplyTagAPI(_VDAPIService): __RESPONSE_OBJECT__ = _VDDuplicateableResponse __API__ = "supply_tags"
()
[ 0.00648315018042922, -0.06898362934589386, -0.08508224040269852, -0.04825940355658531, -0.003325801342725754, 0.002216062741354108, -0.007521182298660278, -0.0023606133181601763, 0.03469213843345642, -0.03926312178373337, -0.03021220676600933, -0.006733552552759647, -0.02210826985538006, -...
4,155
springserve
_TabComplete
this class exists to make any other class have a tab completion function that is already hooked into ipython
class _TabComplete(object): """ this class exists to make any other class have a tab completion function that is already hooked into ipython """ def _tab_completions(self): return [] def __dir__(self): return super(_TabComplete, self).__dir__() + self._tab_completions()
()
[ -0.0032576043158769608, -0.012500160373747349, -0.029468389227986336, -0.03235438093543053, 0.023539939895272255, 0.029659628868103027, 0.016716139391064644, 0.011882975697517395, -0.028094936162233353, -0.02152322418987751, 0.008253756910562515, -0.019436966627836227, -0.0286860428750515, ...
4,156
springserve
__dir__
null
def __dir__(self): return super(_TabComplete, self).__dir__() + self._tab_completions()
(self)
[ -0.012122615240514278, 0.02996956743299961, -0.02860504575073719, -0.06067131832242012, 0.03730803355574608, 0.02065087854862213, 0.019070031121373177, 0.0015662885271012783, -0.01895354688167572, -0.020118383690714836, 0.012155896052718163, -0.02171587198972702, -0.018520893529057503, 0.0...
4,157
springserve
_tab_completions
null
def _tab_completions(self): return []
(self)
[ 0.008390946313738823, 0.016482792794704437, -0.05568096041679382, -0.07042574137449265, 0.020856108516454697, 0.053999535739421844, 0.03789668157696724, 0.0016561609227210283, 0.005695011001080275, -0.03511586785316467, 0.002382689155638218, -0.005428246688097715, -0.034210484474897385, -0...
4,158
springserve._demand
_TagCreativeAPI
null
class _TagCreativeAPI(_VDAPIService): __API__ = "tag_creatives"
()
[ -0.023395735770463943, -0.0841016098856926, -0.0783114805817604, -0.0164928175508976, -0.005373962689191103, 0.024372819811105728, -0.004677338059991598, 0.004437590483576059, 0.06741880625486374, -0.014448178932070732, -0.02098921500146389, 0.03461410850286484, 0.0003319145762361586, -0.0...
4,171
springserve._reporting
_TrafficQualityReport
null
class _TrafficQualityReport(_ReportingAPI): __API__ = "traffic_quality_reports" __RESPONSES_OBJECT__ = _ReportingResponse
()
[ -0.03077453002333641, -0.0497266948223114, -0.08330221474170685, 0.01648765429854393, -0.040232423692941666, -0.025390805676579475, -0.0319385789334774, 0.019788822159171104, -0.021680401638150215, -0.0329025574028492, 0.001075949054211378, 0.01072197686880827, 0.04234226047992706, -0.0219...
4,187
springserve._account
_UserAPI
null
class _UserAPI(_VDAPIService): __API__ = "users"
()
[ -0.043886322528123856, -0.051785122603178024, -0.02882692962884903, 0.01590833067893982, 0.021057315170764923, -0.013167742639780045, -0.0033634493593126535, -0.0006551574915647507, 0.03923562914133072, 0.003930944949388504, 0.0172371007502079, -0.07057245820760727, 0.02137105166912079, 0....
4,200
springserve
_VDAPIMultiResponse
null
class _VDAPIMultiResponse(_VDAPIResponse): def __init__(self, service, api_response_data, path_params, query_params, response_object, ok, payload='', injected_account_id=None): super(_VDAPIMultiResponse, self).__init__(service, api_response_data, ...
(service, api_response_data, path_params, query_params, response_object, ok, payload='', injected_account_id=None)
[ -0.031802475452423096, -0.05073561146855354, -0.15739907324314117, 0.0018474177923053503, -0.015038954094052315, 0.04565463215112686, -0.043577734380960464, -0.011330211535096169, -0.018080124631524086, -0.01774633675813675, 0.039164330810308456, 0.03571520000696182, -0.008771178312599659, ...
4,202
springserve
__getattr__
This is where the magic happens that allows you to treat this as an object that has all of the fields that the api returns. I seperate all of the returned data in self._data
def __getattr__(self, key): """ This is where the magic happens that allows you to treat this as an object that has all of the fields that the api returns. I seperate all of the returned data in self._data """ # if it's not there then try to get it as an attribute try: return self._...
(self, key)
[ 0.018520638346672058, -0.009399572387337685, -0.04003521427512169, 0.019269123673439026, 0.015309118665754795, -0.03147115930914879, 0.02892979420721531, 0.0166668351739645, 0.0519065260887146, -0.0016449252143502235, 0.0015992327826097608, 0.038224928081035614, 0.020713873207569122, 0.015...
4,203
springserve
__getitem__
null
def __getitem__(self, key): if not isinstance(key, int): raise Exception("Must be an index ") if key >= len(self._object_cache): if self._all_pages_gotten: raise IndexError("All pages gotten, no such object") self._get_next_page() return self[key] return self._obj...
(self, key)
[ 0.010680079460144043, -0.028415216132998466, -0.12564381957054138, 0.019215280190110207, 0.02761753275990486, 0.0017471457831561565, 0.0050741457380354404, -0.01278950646519661, 0.0021903025917708874, -0.07044421136379242, 0.009731723926961422, 0.03511574864387512, 0.01272746454924345, 0.0...
4,204
springserve
__init__
null
def __init__(self, service, api_response_data, path_params, query_params, response_object, ok, payload='', injected_account_id=None): super(_VDAPIMultiResponse, self).__init__(service, api_response_data, path_params, query_params, ok, payload) self._pay...
(self, service, api_response_data, path_params, query_params, response_object, ok, payload='', injected_account_id=None)
[ -0.041249293833971024, -0.03196150064468384, -0.11796455830335617, 0.0030927397310733795, -0.028552785515785217, 0.04209189862012863, -0.028820887207984924, 0.0075786481611430645, -0.05656936764717102, 0.005706727039068937, 0.05764177441596985, 0.05097753927111626, -0.020030993968248367, -...
4,205
springserve
__iter__
this will automatically take care of pagination for us.
def __iter__(self): """ this will automatically take care of pagination for us. """ idx = 0 while True: # not sure I love this method, but it's the best # one I can think of right now try: yield self[idx] idx += 1 except IndexError as e: ...
(self)
[ 0.0015922755701467395, -0.05171382427215576, -0.11837103962898254, -0.007501963526010513, -0.04150942340493202, 0.042201247066259384, -0.013118707574903965, -0.03045753948390484, 0.01714858040213585, -0.014511003158986568, 0.022847479209303856, 0.007986240088939667, 0.020149366930127144, 0...
4,206
springserve
__len__
null
def __len__(self): return len([x for x in self])
(self)
[ -0.011586382053792477, -0.04235881567001343, -0.01630399003624916, 0.03230897709727287, 0.02503322996199131, 0.03445183485746384, -0.00243147904984653, -0.026561468839645386, 0.07953490316867828, 0.005465117748826742, -0.00678156316280365, -0.03744186833500862, 0.037076421082019806, -0.025...
4,207
springserve
_build_cache
null
def _build_cache(self, objects): self._object_cache.extend([self._build_response_object(x) for x in objects])
(self, objects)
[ -0.05187474936246872, 0.0060700783506035805, -0.11756415665149689, -0.0038025202229619026, 0.0013866989174857736, 0.020809205248951912, -0.04747917503118515, 0.028920084238052368, -0.018855616450309753, -0.015428115613758564, 0.03816474601626396, 0.08498109132051468, -0.011730251833796501, ...
4,208
springserve
_build_response_object
null
def _build_response_object(self, data): return self.response_object(self._service, data, self._path_params, self._query_params, True, payload='', injected_a...
(self, data)
[ -0.012342050671577454, -0.030239412561058998, -0.04596094414591789, -0.035739172250032425, 0.019073236733675003, 0.021610163152217865, -0.03323928266763687, 0.03796129673719406, -0.01141616515815258, 0.0036456731613725424, 0.0956995040178299, 0.04070191830396652, 0.018702883273363113, -0.0...
4,209
springserve
_get_next_page
null
def _get_next_page(self): if self._all_pages_gotten: return params = self._query_params.copy() params['page'] = self._current_page+1 resp = self._service.get_raw(self._path_params, **params) # this means we are donesky, we don't know # how many items there will be, only that we hit the l...
(self)
[ -0.037571877241134644, -0.025235112756490707, -0.0890565812587738, 0.04097761958837509, -0.035705965012311935, 0.0661221519112587, -0.009854918345808983, -0.04804272577166557, -0.025253228843212128, -0.038731276988983154, 0.029111864045262337, 0.0012114846613258123, -0.01345087680965662, 0...
4,210
springserve
_is_last_page
null
def _is_last_page(self, resp): return (not resp or not resp.json)
(self, resp)
[ -0.010685897432267666, -0.007039054296910763, -0.05475874990224838, 0.050304852426052094, -0.02857053279876709, 0.05175495892763138, -0.0016173424664884806, -0.0027987901121377945, 0.007582843769341707, -0.027413900941610336, 0.07533644139766693, -0.01162673905491829, -0.00003627961268648505...
4,211
springserve
_tab_completions
null
def _tab_completions(self): if not self.raw: return [] return list(self.raw.keys())
(self)
[ 0.0293465293943882, 0.0039726197719573975, -0.06969800591468811, -0.07810178399085999, 0.03318158909678459, 0.04858851432800293, 0.029279833659529686, -0.00003448816642048769, 0.0592266321182251, -0.035682711750268936, -0.004960563965141773, -0.014373130165040493, -0.034582216292619705, -0...
4,212
springserve
_VDAPIResponse
null
class _VDAPIResponse(_TabComplete): def __init__(self, service, api_response_data, path_params, query_params, ok, payload='', injected_account_id=None): super(_VDAPIResponse, self).__init__() self._service = service self._raw_response = api_response_data self._path_...
(service, api_response_data, path_params, query_params, ok, payload='', injected_account_id=None)
[ 0.01349723432213068, 0.00485450541600585, -0.11539235711097717, -0.0597117654979229, 0.011490645818412304, 0.00206507695838809, -0.0011686355574056506, 0.03460691124200821, 0.0002989075146615505, -0.017465421929955482, 0.01790633052587509, 0.022567376494407654, -0.03295125067234039, -0.010...
4,215
springserve
__getitem__
null
def __getitem__(self, key): if isinstance(key, str): return self.raw[key] elif isinstance(key, int): return self.raw[key]
(self, key)
[ 0.045382797718048096, -0.047251101583242416, -0.043650370091199875, 0.007545399945229292, 0.02816043421626091, -0.01387640181928873, 0.007460476830601692, 0.01428403239697218, 0.11203029006719589, -0.08594197779893875, -0.03171021118760109, 0.031013842672109604, 0.022589491680264473, -0.00...
4,216
springserve
__init__
null
def __init__(self, service, api_response_data, path_params, query_params, ok, payload='', injected_account_id=None): super(_VDAPIResponse, self).__init__() self._service = service self._raw_response = api_response_data self._path_params = path_params self._query_params = query_params or...
(self, service, api_response_data, path_params, query_params, ok, payload='', injected_account_id=None)
[ -0.009843646548688412, -0.05751515552401543, -0.0338178426027298, -0.0012889353092759848, -0.019687293097376823, 0.013853667303919792, -0.009065511636435986, 0.05148103088140488, -0.014512456953525543, 0.028662102296948433, 0.05197750777006149, 0.023277215659618378, 0.017787307500839233, -...
4,218
springserve
_VDAPIService
null
class _VDAPIService(object): __API__ = None __RESPONSE_OBJECT__ = _VDAPISingleResponse __RESPONSES_OBJECT__ = _VDAPIMultiResponse def __init__(self): self.account_id = None @property def endpoint(self): """ The api endpoint that is used for this service. For example::...
()
[ 0.005262251477688551, -0.016869213432073593, -0.09860023111104965, 0.05375856161117554, 0.012024940922856331, -0.02696502022445202, -0.052172381430864334, 0.00871861819177866, 0.00386362848803401, -0.010438763536512852, 0.006162514444440603, -0.010347665287554264, -0.018358934670686722, -0...
4,231
springserve
_VDAPISingleResponse
null
class _VDAPISingleResponse(_VDAPIResponse): def __init__(self, service, api_response_data, path_params, query_params, ok, payload='', injected_account_id=None): self._dirty = {} super(_VDAPISingleResponse, self).__init__(service, api_response_data, ...
(service, api_response_data, path_params, query_params, ok, payload='', injected_account_id=None)
[ -0.008098934777081013, -0.02138158120214939, -0.0580105222761631, 0.010837776586413383, 0.024125320836901665, -0.03429676219820976, -0.038137998431921005, 0.0282997265458107, 0.06396836042404175, -0.021420776844024658, -0.025066033005714417, -0.020499663427472115, -0.0023909742012619972, 0...
4,235
springserve
__init__
null
def __init__(self, service, api_response_data, path_params, query_params, ok, payload='', injected_account_id=None): self._dirty = {} super(_VDAPISingleResponse, self).__init__(service, api_response_data, path_params, query_params, ...
(self, service, api_response_data, path_params, query_params, ok, payload='', injected_account_id=None)
[ -0.026510868221521378, -0.05379336327314377, -0.051221273839473724, 0.010205673985183239, -0.01938251219689846, 0.020190883427858353, -0.022156691178679466, 0.04629756510257721, -0.0032219982240349054, 0.012768574990332127, 0.0425129234790802, 0.0151569414883852, -0.00033270634594373405, -...
4,236
springserve
__setattr__
If it's a property that was already defined when the class was initialized that let it exist. If it's new than let's slap it into _data. This allows us to set new attributes and save it back to the api
def __setattr__(self, attr, value): """ If it's a property that was already defined when the class was initialized that let it exist. If it's new than let's slap it into _data. This allows us to set new attributes and save it back to the api """ # allows you to add any private field in the ini...
(self, attr, value)
[ 0.00933410506695509, 0.03487960621714592, -0.014256702736020088, 0.008383658714592457, 0.048490721732378006, -0.021752679720520973, -0.015135417692363262, 0.03959597274661064, 0.042250052094459534, -0.03086262196302414, -0.028136812150478363, 0.00992589257657528, 0.027204299345612526, 0.02...
4,238
springserve
duplicate
null
def duplicate(self, **kwargs): payload = self.raw.copy() payload.update(kwargs) return self._service.new(payload, account_id=self.account_id)
(self, **kwargs)
[ -0.04987772926688194, -0.049119919538497925, -0.005752473138272762, -0.017963560298085213, -0.06382834166288376, -0.002897765254601836, -0.025593338534235954, 0.013709486462175846, 0.05545797199010849, 0.0051625859923660755, -0.02319934405386448, 0.028969040140509605, -0.040163975208997726, ...
4,239
springserve
save
Save this object back to the api after making changes. As an example:: tag = springserve.supply_tags.get(1) tag.name = "This is my new name" # this will print if the save went through correctly print tag.save().ok Returns: An API response ...
def save(self, dirty_only=False, **kwargs): """ Save this object back to the api after making changes. As an example:: tag = springserve.supply_tags.get(1) tag.name = "This is my new name" # this will print if the save went through correctly print tag.save().ok Returns: ...
(self, dirty_only=False, **kwargs)
[ -0.0037160746287554502, -0.03134307265281677, -0.07463696599006653, 0.029728597030043602, 0.010392018593847752, -0.07207607477903366, -0.04568776860833168, 0.0039178840816020966, 0.07675248384475708, -0.04394339397549629, -0.0406402163207531, -0.07118532806634903, 0.009255391545593739, -0....
4,240
springserve
set_dirty
you need this for nested fields that you have changed but didn't actually set
def set_dirty(self, field): """ you need this for nested fields that you have changed but didn't actually set """ self._dirty[field] = self._raw_response[field]
(self, field)
[ 0.022633515298366547, 0.018521446734666824, -0.01963513158261776, 0.06850022077560425, -0.057877376675605774, -0.0435536690056324, -0.027773601934313774, -0.008005685172975063, 0.07059052586555481, -0.03215980902314186, -0.0062537724152207375, -0.07696422934532166, 0.03359903395175934, -0....
4,241
springserve
_VDDuplicateableResponse
null
class _VDDuplicateableResponse(_VDAPISingleResponse): def duplicate(self, **kwargs): return self._service.get("{}/duplicate".format(self.id), account_id=self.account_id)
(service, api_response_data, path_params, query_params, ok, payload='', injected_account_id=None)
[ -0.03206140175461769, -0.050579626113176346, -0.04812665283679962, -0.0010105560068041086, -0.023165054619312286, -0.01006237417459488, -0.021403059363365173, 0.0048066191375255585, 0.0389711856842041, 0.015400183387100697, -0.007803738582879305, 0.011142028495669365, -0.02772551216185093, ...
4,248
springserve
duplicate
null
def duplicate(self, **kwargs): return self._service.get("{}/duplicate".format(self.id), account_id=self.account_id)
(self, **kwargs)
[ -0.028048167005181313, -0.02917955070734024, -0.03338424116373062, 0.01673433743417263, -0.03346867486834526, 0.007902795448899269, -0.016531702131032944, -0.025363244116306305, 0.06930143386125565, 0.012833599001169205, -0.02470467798411846, -0.014775524847209454, -0.016075771301984787, 0...
4,251
springserve._demand
_VideoCreativeAPI
null
class _VideoCreativeAPI(_VDAPIService): __API__ = "videos" def upload_video(self, payload, video_file, **kwargs): files={'video': (video_file.split('/')[-1], open(video_file, 'rb'), "multipart/form-data")} if payload: files.update({x:str(y) for x,y in payload.i...
()
[ 0.017552394419908524, -0.02719130553305149, -0.1139686107635498, 0.05167251452803612, -0.058321285992860794, -0.019386226311326027, 0.00808512233197689, 0.04939603433012962, -0.021138755604624748, 0.044156514108181, -0.007886381819844246, 0.0014476433862000704, -0.047733839601278305, -0.00...
4,264
springserve._demand
upload_video
null
def upload_video(self, payload, video_file, **kwargs): files={'video': (video_file.split('/')[-1], open(video_file, 'rb'), "multipart/form-data")} if payload: files.update({x:str(y) for x,y in payload.items()}) return self.post(payload, files=files, **kwargs)
(self, payload, video_file, **kwargs)
[ 0.035746946930885315, 0.025488825514912605, -0.09986890852451324, 0.08519457280635834, -0.06064463034272194, -0.00936270970851183, 0.018047340214252472, 0.057028207927942276, -0.04131067544221878, 0.04558779299259186, -0.014552624896168709, 0.006928579416126013, -0.03870267793536186, -0.00...
4,270
springserve
_format_params
null
def _format_params(params): _params = {} for key, value in params.items(): if isinstance(value, list): # make sure any list has the [] on it key = "{}[]".format(key.lstrip("[]")) _params[key] = value return _params
(params)
[ 0.023624565452337265, 0.011857925914227962, -0.01880471594631672, -0.038887422531843185, -0.0785781592130661, -0.008950497023761272, -0.02705688402056694, -0.04819849878549576, 0.03823017328977585, 0.03304518014192581, -0.019023800268769264, -0.01351931318640709, 0.011794026009738445, -0.0...
4,271
springserve
_format_url
null
def _format_url(endpoint, path_param): _url = endpoint if path_param: _url += "/{}".format(path_param) return _url
(endpoint, path_param)
[ -0.037290219217538834, 0.008823285810649395, 0.016983749344944954, 0.028992025181651115, -0.01604546792805195, -0.004321258049458265, 0.02043559029698372, -0.009675486013293266, -0.03773783892393112, -0.019213242456316948, 0.012326776050031185, -0.025376630946993828, 0.020470023155212402, ...
4,272
springserve
_install_ipython_completers
null
def _install_ipython_completers(): # pragma: no cover from IPython.utils.generics import complete_object @complete_object.when_type(_TabComplete) def complete_report_object(obj, prev_completions): """ Add in all the methods of the _wrapped object so its visible in iPython as well ...
()
[ -0.018231650814414024, -0.008658727630972862, -0.026450693607330322, -0.051856592297554016, 0.04106039181351662, 0.013817396946251392, 0.013791277073323727, 0.025475552305579185, -0.06453342735767365, -0.04342859238386154, 0.020373476669192314, -0.012563643977046013, -0.022933222353458405, ...
4,278
builtins
object
The base class of the class hierarchy. When called, it accepts no arguments and returns a new featureless instance that has no instance attributes and cannot be given any.
from builtins import object
()
[ 0.029848363250494003, -0.015158023685216904, -0.027192575857043266, 0.0011660821037366986, 0.01899137534201145, 0.008222079835832119, 0.025739410892128944, 0.03674672544002533, -0.007612417917698622, -0.039118558168411255, -0.007579011842608452, 0.025004476308822632, -0.019509170204401016, ...
4,279
springserve
raw_get
null
def raw_get(path_param, **query_params): global API params = _format_params(query_params) return API().get(_format_url("", path_param), params=params).json
(path_param, **query_params)
[ 0.0186700988560915, -0.023850442841649055, -0.012046907097101212, 0.022233758121728897, -0.022859571501612663, -0.006940444000065327, -0.0377226397395134, -0.04596251621842384, 0.03417636454105377, -0.025084685534238815, 0.028717881068587303, 0.012872633524239063, -0.006853525526821613, -0...
4,280
springserve._decorators
raw_response_retry
Decorator for SpringServe API to handle retries (with exponential backoff) in the case of a rate-limit or 5XX error. Sleep duration and backoff factor control wait time between successive failures, e.g. sleep_duration 3 and backoff_factor 2 means sleep 3s, 6s, 12s, 24s :param int limit: Max numbe...
def raw_response_retry(api_call, limit=4, sleep_duration=5, backoff_factor=2): """ Decorator for SpringServe API to handle retries (with exponential backoff) in the case of a rate-limit or 5XX error. Sleep duration and backoff factor control wait time between successive failures, e.g. sleep_duratio...
(api_call, limit=4, sleep_duration=5, backoff_factor=2)
[ 0.013185462914407253, -0.08113548904657364, -0.060908328741788864, 0.05156980827450752, -0.01196616142988205, 0.0078073060140013695, -0.04351675137877464, -0.026956945657730103, -0.0051749395206570625, -0.015009688213467598, 0.028204603120684624, 0.02761858142912388, 0.04884764924645424, 0...
4,281
springserve
set_credentials
null
def set_credentials(user, password, base_url='https://console.springserve.com/api/v0'): global _CONFIG_OVERRIDE _CONFIG_OVERRIDE = {'user': user, 'password': password, 'base_url': base_url} API(True)
(user, password, base_url='https://console.springserve.com/api/v0')
[ -0.04215614125132561, -0.059419747442007065, 0.0324140265583992, 0.03273637592792511, -0.0033913846127688885, 0.003411531448364258, -0.037714883685112, 0.01994984783232212, -0.03427648916840553, 0.029709873721003532, 0.012768619693815708, -0.003796559991315007, -0.02419411577284336, 0.0105...
4,282
springserve
set_token
null
def set_token(token, base_url='https://console.springserve.com/api/v0'): global _TOKEN_OVERRIDE _TOKEN_OVERRIDE = {'token': token, 'base_url': base_url} API(True)
(token, base_url='https://console.springserve.com/api/v0')
[ -0.021106800064444542, -0.02706492692232132, -0.023552952334284782, 0.06111885979771614, 0.024636248126626015, 0.03658744692802429, -0.05171864852309227, 0.019534273073077202, -0.03424613177776337, 0.04403074085712433, 0.018118999898433685, -0.010527190752327442, -0.02348306216299534, -0.0...
4,283
springserve
setup_config
This is used the first time you run it to set up your configuration if you want to do that over the command prompt
def setup_config(): """ This is used the first time you run it to set up your configuration if you want to do that over the command prompt """ current_file = _lnk.config_file() current_config = _lnk.config() or {} if current_config.get('springserve'): print("already configured, remo...
()
[ 0.02198764495551586, -0.03658926114439964, 0.021021779626607895, -0.06495919078588486, 0.013266447931528091, 0.025813231244683266, -0.04992199316620827, 0.02937367744743824, 0.015718989074230194, -0.008219326846301556, -0.043482888489961624, -0.05984579026699066, -0.02456328645348549, 0.02...
4,285
springserve
switch_account
null
def switch_account(account_name="__default__"): global _ACCOUNT _ACCOUNT = account_name API(True)
(account_name='__default__')
[ -0.044926393777132034, 0.005378697533160448, -0.0478769913315773, -0.004983527585864067, -0.04598017781972885, -0.024886902421712875, -0.011301850900053978, -0.0017617978155612946, -0.0025290853809565306, -0.010845210403203964, 0.00695937592536211, -0.046577323228120804, -0.03551257401704788...
4,286
csv
Dialect
Describe a CSV dialect. This must be subclassed (see csv.excel). Valid attributes are: delimiter, quotechar, escapechar, doublequote, skipinitialspace, lineterminator, quoting.
class Dialect: """Describe a CSV dialect. This must be subclassed (see csv.excel). Valid attributes are: delimiter, quotechar, escapechar, doublequote, skipinitialspace, lineterminator, quoting. """ _name = "" _valid = False # placeholders delimiter = None quotechar = None ...
()
[ 0.04718571901321411, 0.021087581291794777, 0.03464131057262421, -0.018366022035479546, -0.024403920397162437, -0.029810991138219833, -0.017338678240776062, 0.006371333729475737, -0.012886855751276016, -0.02508881501853466, 0.021700384095311165, 0.00662816921249032, -0.0144458943977952, 0.0...
4,287
csv
__init__
null
def __init__(self): if self.__class__ != Dialect: self._valid = True self._validate()
(self)
[ 0.03333669528365135, 0.006013792473822832, 0.03522304818034172, 0.023654529824852943, -0.05128208547830582, -0.0209502000361681, 0.02447250485420227, -0.013830470852553844, 0.01869659312069416, -0.014414739795029163, 0.006360180210322142, 0.03350362926721573, 0.0028065757360309362, 0.03108...
4,288
csv
_validate
null
def _validate(self): try: _Dialect(self) except TypeError as e: # We do this for compatibility with py2.3 raise Error(str(e))
(self)
[ 0.01323169656097889, -0.019019518047571182, 0.06353221833705902, 0.05212384834885597, -0.034425828605890274, -0.03482729569077492, 0.04171915352344513, 0.009392663836479187, 0.02674776501953602, -0.03002641536295414, 0.021010126918554306, 0.016853267326951027, 0.06413441896438599, -0.01142...
4,289
unicodecsv.py3
DictReader
null
class DictReader(csv.DictReader): def __init__(self, csvfile, fieldnames=None, restkey=None, restval=None, dialect='excel', encoding='utf-8', errors='strict', *args, **kwds): csv.DictReader.__init__(self, csvfile, fieldnames, restkey, restval, ...
(csvfile, fieldnames=None, restkey=None, restval=None, dialect='excel', encoding='utf-8', errors='strict', *args, **kwds)
[ 0.006333872675895691, 0.014829196967184544, -0.025682052597403526, 0.0032968970481306314, -0.04454231262207031, -0.003702739253640175, -0.02380332350730896, 0.09200304001569748, 0.05406364053487778, -0.03644371032714844, -0.010934936814010143, 0.025134850293397903, -0.0384136401116848, 0.0...
4,290
unicodecsv.py3
__init__
null
def __init__(self, csvfile, fieldnames=None, restkey=None, restval=None, dialect='excel', encoding='utf-8', errors='strict', *args, **kwds): csv.DictReader.__init__(self, csvfile, fieldnames, restkey, restval, dialect, *args, **kwds) self.reader = UnicodeRea...
(self, csvfile, fieldnames=None, restkey=None, restval=None, dialect='excel', encoding='utf-8', errors='strict', *args, **kwds)
[ -0.009934277273714542, 0.009215054102241993, -0.004571565892547369, 0.013970920816063881, -0.04412437602877617, -0.010060141794383526, -0.0030522055458277464, 0.09385869652032852, 0.03984499350190163, -0.03668040782213211, -0.01080633606761694, 0.05365408957004547, -0.036087051033973694, 0...
4,291
csv
__iter__
null
def __iter__(self): return self
(self)
[ 0.014389807358384132, -0.04363524913787842, -0.07006032019853592, -0.0018453086959198117, -0.04502426087856293, 0.0008390172733925283, -0.012772118672728539, 0.034420352429151535, 0.10359983891248703, 0.025696691125631332, 0.007118677720427513, -0.020581066608428955, -0.0016261583659797907, ...
4,292
csv
__next__
null
def __next__(self): if self.line_num == 0: # Used only for its side effect. self.fieldnames row = next(self.reader) self.line_num = self.reader.line_num # unlike the basic reader, we prefer not to return blanks, # because we will typically wind up with a dict full of None # value...
(self)
[ 0.04006302356719971, -0.01565692573785782, -0.033535245805978775, 0.0024564422201365232, -0.021453984081745148, 0.008130494505167007, 0.020810948684811592, 0.042518250644207, 0.06917496770620346, -0.06633003056049347, -0.033203985542058945, 0.04314179718494415, -0.0028595568146556616, 0.06...
4,293
unicodecsv.py3
DictWriter
null
class DictWriter(csv.DictWriter): def __init__(self, csvfile, fieldnames, restval='', extrasaction='raise', dialect='excel', encoding='utf-8', errors='strict', *args, **kwds): super().__init__(csvfile, fieldnames, restval, extrasaction, dialect, *ar...
(csvfile, fieldnames, restval='', extrasaction='raise', dialect='excel', encoding='utf-8', errors='strict', *args, **kwds)
[ 0.0010033106664195657, 0.029044803231954575, -0.022508371621370316, -0.016629185527563095, -0.037201836705207825, -0.05495644360780716, -0.05459630861878395, 0.09889278560876846, -0.012109504081308842, -0.0244711022824049, -0.0010297580156475306, -0.008021984249353409, 0.02285050041973591, ...
4,294
unicodecsv.py3
__init__
null
def __init__(self, csvfile, fieldnames, restval='', extrasaction='raise', dialect='excel', encoding='utf-8', errors='strict', *args, **kwds): super().__init__(csvfile, fieldnames, restval, extrasaction, dialect, *args, **kwds) self.writer = UnicodeWriter(csvfile, d...
(self, csvfile, fieldnames, restval='', extrasaction='raise', dialect='excel', encoding='utf-8', errors='strict', *args, **kwds)
[ -0.027493387460708618, 0.018154166638851166, 0.031154433265328407, 0.02230394445359707, -0.03554413467645645, -0.04521213844418526, -0.03781896084547043, 0.07805491983890533, 0.0012284941039979458, -0.03493988513946533, 0.01329350657761097, 0.04087575525045395, 0.00817070808261633, 0.03071...
4,295
csv
_dict_to_list
null
def _dict_to_list(self, rowdict): if self.extrasaction == "raise": wrong_fields = rowdict.keys() - self.fieldnames if wrong_fields: raise ValueError("dict contains fields not in fieldnames: " + ", ".join([repr(x) for x in wrong_fields])) return (rowdict.g...
(self, rowdict)
[ 0.059725698083639145, -0.03618548437952995, -0.003656948683783412, -0.0018318231450393796, 0.002132103778421879, -0.019378703087568283, 0.05758243054151535, 0.053653109818696976, 0.08965998888015747, -0.04475855082273483, -0.022968674078583717, 0.02028959058225155, -0.022754346951842308, -...
4,296
unicodecsv.py3
writeheader
null
def writeheader(self): header = dict(zip(self.fieldnames, self.fieldnames)) self.writerow(header)
(self)
[ -0.025137903168797493, 0.028457680717110634, -0.03254750743508339, -0.03839990124106407, -0.00770479254424572, -0.042951758950948715, -0.008603186346590519, 0.05219237878918648, -0.028269445523619652, 0.0016823485493659973, -0.0006379662663675845, -0.05267152190208435, 0.05551215633749962, ...
4,297
csv
writerow
null
def writerow(self, rowdict): return self.writer.writerow(self._dict_to_list(rowdict))
(self, rowdict)
[ 0.03461737558245659, -0.006053735502064228, -0.028658365830779076, 0.005834147334098816, -0.01331305131316185, -0.035340726375579834, -0.03520294651389122, 0.09348414093255997, 0.006583329755812883, 0.020753202959895134, 0.006256100721657276, -0.017687585204839706, 0.019668182358145714, 0....
4,298
csv
writerows
null
def writerows(self, rowdicts): return self.writer.writerows(map(self._dict_to_list, rowdicts))
(self, rowdicts)
[ -0.000426940358011052, -0.009356883354485035, -0.05166249722242355, -0.002920771250501275, -0.036177635192871094, -0.025327816605567932, -0.027306824922561646, 0.07707711309194565, 0.004164160694926977, 0.07023739069700241, -0.0013399525778368115, 0.003973203711211681, 0.01985950767993927, ...
4,299
_csv
Error
null
from _csv import Error
null
[ -0.017071323469281197, 0.052532218396663666, 0.017977619543671608, 0.04043728485703468, -0.017746925354003906, -0.0547732412815094, -0.0019660447724163532, 0.0792926698923111, 0.010018691420555115, -0.008510944433510303, 0.021602803841233253, 0.010092843323946, -0.0034645230043679476, 0.02...
4,300
csv
Sniffer
"Sniffs" the format of a CSV file (i.e. delimiter, quotechar) Returns a Dialect object.
class Sniffer: ''' "Sniffs" the format of a CSV file (i.e. delimiter, quotechar) Returns a Dialect object. ''' def __init__(self): # in case there is more than one possible delimiter self.preferred = [',', '\t', ';', ' ', ':'] def sniff(self, sample, delimiters=None): "...
()
[ 0.07573184370994568, 0.005697119515389204, 0.031037993729114532, 0.0047628567554056644, 0.04400459676980972, -0.0006488685612566769, 0.016682114452123642, 0.016574418172240257, -0.008389520458877087, -0.032308805733919144, 0.00357012334279716, 0.054063405841588974, -0.05716504901647568, 0....
4,301
csv
__init__
null
def __init__(self): # in case there is more than one possible delimiter self.preferred = [',', '\t', ';', ' ', ':']
(self)
[ 0.030229952186346054, 0.0033860092516988516, 0.02114398218691349, -0.05475357547402382, -0.025135016068816185, -0.02685031108558178, 0.04272952675819397, 0.03624197468161583, 0.00328835635446012, -0.0012100471649318933, 0.001144237583503127, -0.002110152505338192, -0.04554872587323189, 0.0...
4,302
csv
_guess_delimiter
The delimiter /should/ occur the same number of times on each row. However, due to malformed data, it may not. We don't want an all or nothing approach, so we allow for small variations in this number. 1) build a table of the frequency of each character on every line. ...
def _guess_delimiter(self, data, delimiters): """ The delimiter /should/ occur the same number of times on each row. However, due to malformed data, it may not. We don't want an all or nothing approach, so we allow for small variations in this number. 1) build a table of the frequency of each ...
(self, data, delimiters)
[ 0.06756120920181274, 0.00449806684628129, -0.007547975983470678, 0.007957556284964085, 0.05285533517599106, 0.0153299979865551, 0.02650568261742592, 0.028202515095472336, -0.024574805051088333, -0.045950986444950104, 0.0051051233895123005, 0.025940071791410446, -0.04357152059674263, -0.014...
4,303
csv
_guess_quote_and_delimiter
Looks for text enclosed between two identical quotes (the probable quotechar) which are preceded and followed by the same character (the probable delimiter). For example: ,'some text', The quote with the most wins, same with the delimiter. If the...
def _guess_quote_and_delimiter(self, data, delimiters): """ Looks for text enclosed between two identical quotes (the probable quotechar) which are preceded and followed by the same character (the probable delimiter). For example: ,'some text', The quote with the most wins, ...
(self, data, delimiters)
[ 0.06659603863954544, -0.008653944358229637, 0.0248210858553648, 0.031213203445076942, 0.010846932418644428, 0.014111829921603203, 0.044528476893901825, 0.03219660744071007, -0.01400365587323904, -0.03249162808060646, 0.03420274704694748, 0.07851487398147583, -0.06537661701440811, -0.025765...
4,304
csv
has_header
null
def has_header(self, sample): # Creates a dictionary of types of data in each column. If any # column is of a single type (say, integers), *except* for the first # row, then the first row is presumed to be labels. If the type # can't be determined, it is assumed to be a string in which case # the le...
(self, sample)
[ 0.008184641599655151, -0.011471609584987164, 0.020695719867944717, -0.006367913447320461, 0.02483486384153366, -0.005028778687119484, 0.02352382242679596, 0.06817413121461868, -0.028693070635199547, -0.016144534572958946, -0.005412726663053036, 0.05768580734729767, 0.0029006784316152334, -...
4,305
csv
sniff
Returns a dialect (or None) corresponding to the sample
def sniff(self, sample, delimiters=None): """ Returns a dialect (or None) corresponding to the sample """ quotechar, doublequote, delimiter, skipinitialspace = \ self._guess_quote_and_delimiter(sample, delimiters) if not delimiter: delimiter, skipinitialspace = self._guess_del...
(self, sample, delimiters=None)
[ 0.015179901383817196, -0.03440777584910393, 0.09184959530830383, -0.033619675785303116, 0.0021874282974749804, -0.015582907944917679, 0.015350059606134892, 0.08310884237289429, 0.011588668450713158, 0.008758668787777424, -0.033171892166137695, 0.055310364812612534, -0.08790909498929977, 0....
4,306
unicodecsv.py3
UnicodeReader
null
class UnicodeReader(object): def __init__(self, f, dialect=None, encoding='utf-8', errors='strict', **kwds): format_params = ['delimiter', 'doublequote', 'escapechar', 'lineterminator', 'quotechar', 'quoting', 'skipinitialspace'] if dialec...
(f, dialect=None, encoding='utf-8', errors='strict', **kwds)
[ 0.012363143265247345, -0.009440691210329533, 0.015318327583372593, -0.001620207680389285, -0.027176471427083015, 0.0040914337150752544, -0.00016000427422113717, 0.025380916893482208, 0.06434071809053421, 0.00183179322630167, 0.016412492841482162, -0.0019147909479215741, -0.02809295244514942,...
4,307
unicodecsv.py3
__init__
null
def __init__(self, f, dialect=None, encoding='utf-8', errors='strict', **kwds): format_params = ['delimiter', 'doublequote', 'escapechar', 'lineterminator', 'quotechar', 'quoting', 'skipinitialspace'] if dialect is None: if not any([kwd_name in format_param...
(self, f, dialect=None, encoding='utf-8', errors='strict', **kwds)
[ 0.04124392941594124, 0.007668329868465662, 0.01203566137701273, -0.0004323287575971335, -0.04039086401462555, 0.011572037823498249, -0.009782452136278152, 0.014706132002174854, 0.0008177155978046358, 0.014019968919456005, 0.007654421031475067, 0.015012122690677643, -0.02661197818815708, 0....
4,309
unicodecsv.py3
__next__
null
def __next__(self): return self.reader.__next__()
(self)
[ -0.0049353716894984245, -0.04849138855934143, -0.05585886538028717, 0.029553625732660294, -0.009979581460356712, 0.004680021665990353, 0.01887078583240509, 0.02618802897632122, 0.07494732737541199, -0.04681695997714996, 0.010222372598946095, 0.0035372257698327303, 0.004075135104358196, 0.0...
4,310
unicodecsv.py3
UnicodeWriter
null
class UnicodeWriter(object): def __init__(self, f, dialect=csv.excel, encoding='utf-8', errors='strict', *args, **kwds): if f is None: raise TypeError f = _UnicodeWriteWrapper(f, encoding=encoding, errors=errors) self.writer = csv.writer(f, dialect, *args, **kwd...
(f, dialect=<class 'csv.excel'>, encoding='utf-8', errors='strict', *args, **kwds)
[ -0.000345062289852649, 0.0062750838696956635, 0.026536693796515465, 0.003182428190484643, -0.012334714643657207, -0.04553251340985298, -0.054904740303754807, 0.060506533831357956, 0.001233246992342174, 0.012388577684760094, 0.03531642630696297, -0.013887775130569935, 0.00307245715521276, 0...
4,311
unicodecsv.py3
__init__
null
def __init__(self, f, dialect=csv.excel, encoding='utf-8', errors='strict', *args, **kwds): if f is None: raise TypeError f = _UnicodeWriteWrapper(f, encoding=encoding, errors=errors) self.writer = csv.writer(f, dialect, *args, **kwds)
(self, f, dialect=<class 'csv.excel'>, encoding='utf-8', errors='strict', *args, **kwds)
[ 0.0012132447445765138, 0.022494031116366386, 0.02236786112189293, 0.018708977848291397, -0.02467494271695614, -0.019754372537136078, -0.03885987773537636, 0.055261775851249695, -0.048953354358673096, 0.002403959399089217, 0.01733013615012169, 0.014356166124343872, -0.008885863237082958, 0....
4,312
unicodecsv.py3
writerow
null
def writerow(self, row): return self.writer.writerow(row)
(self, row)
[ 0.02090706303715706, 0.004862010944634676, 0.005110707599669695, 0.026759713888168335, 0.00370764615945518, -0.05769752338528633, -0.059720251709222794, 0.10034063458442688, 0.007452596910297871, 0.009922979399561882, 0.012799565680325031, -0.03551382198929787, 0.031120186671614647, 0.0537...
4,313
unicodecsv.py3
writerows
null
def writerows(self, rows): return self.writer.writerows(rows)
(self, rows)
[ -0.02765708416700363, -0.013828542083501816, -0.03273900970816612, -0.004876469261944294, -0.03639531508088112, -0.03240356966853142, -0.047699667513370514, 0.0703083723783493, 0.0020545742008835077, 0.057058461010456085, 0.00887240655720234, -0.014423949643969536, 0.022390665486454964, 0....
4,315
csv
excel
Describe the usual properties of Excel-generated CSV files.
class excel(Dialect): """Describe the usual properties of Excel-generated CSV files.""" delimiter = ',' quotechar = '"' doublequote = True skipinitialspace = False lineterminator = '\r\n' quoting = QUOTE_MINIMAL
()
[ 0.053584158420562744, 0.006248219404369593, 0.03552088141441345, -0.05814451351761818, 0.02640017494559288, -0.04065128043293953, -0.06958102434873581, -0.016736142337322235, -0.05354853346943855, 0.012808182276785374, 0.059890273958444595, -0.03393544629216194, -0.02143010124564171, 0.047...
4,318
csv
excel_tab
Describe the usual properties of Excel-generated TAB-delimited files.
class excel_tab(excel): """Describe the usual properties of Excel-generated TAB-delimited files.""" delimiter = '\t'
()
[ 0.028771040961146355, 0.0005901353433728218, -0.006574840750545263, -0.06259213387966156, 0.01042016688734293, -0.04833108186721802, -0.05658186227083206, 0.041431721299886703, -0.07525280863046646, 0.01708836294710636, 0.04662402346730232, -0.029464533552527428, 0.0025983736850321293, 0.0...
4,327
csv
unix_dialect
Describe the usual properties of Unix-generated CSV files.
class unix_dialect(Dialect): """Describe the usual properties of Unix-generated CSV files.""" delimiter = ',' quotechar = '"' doublequote = True skipinitialspace = False lineterminator = '\n' quoting = QUOTE_ALL
()
[ 0.01470339298248291, 0.03664591163396835, 0.04270738363265991, 0.0012620845809578896, 0.006018173415213823, -0.004944427404552698, -0.0476951077580452, 0.024834707379341125, -0.02977047488093376, -0.0038317146245390177, 0.025233032181859016, -0.0058579775504767895, -0.050847068428993225, 0...
4,335
mdit_py_toc.plugin
slugify
Convert title text to id slug for link references Args: title: Text to convert into a slug
def slugify(title: str) -> str: """ Convert title text to id slug for link references Args: title: Text to convert into a slug """ return re.sub( r"[^\w\u4e00-\u9fff\- ]", "", title.strip().lower().replace(" ", "-") )
(title: str) -> str
[ -0.027689218521118164, 0.005969861056655645, 0.02572053112089634, 0.00994369201362133, -0.004775888752192259, -0.017390068620443344, 0.03962894156575203, -0.04261842742562294, 0.061102211475372314, 0.020233727991580963, -0.044295456260442734, 0.04192574322223663, -0.0020746407099068165, 0....
4,336
openapi_spec_validator.validation.validators
OpenAPIV2SpecValidator
null
class OpenAPIV2SpecValidator(SpecValidator): schema_validator = openapi_v2_schema_validator keyword_validators = { "__root__": keywords.RootValidator, "components": keywords.ComponentsValidator, "default": keywords.OpenAPIV30ValueValidator, "operation": keywords.OperationValidato...
(schema: Union[Mapping[Hashable, Any], jsonschema_path.paths.SchemaPath], base_uri: str = '', spec_url: Optional[str] = None) -> None
[ 0.06808407604694366, -0.0737457275390625, 0.0004527406126726419, -0.021654918789863586, -0.018625754863023758, -0.023746484890580177, 0.037576064467430115, -0.016858741641044617, -0.02179916575551033, 0.03422234579920769, 0.04323771595954895, -0.021510673686861992, -0.00016903819050639868, ...
4,337
openapi_spec_validator.validation.validators
__init__
null
def __init__( self, schema: AnySchema, base_uri: str = "", spec_url: Optional[str] = None, ) -> None: if spec_url is not None: warnings.warn( "spec_url parameter is deprecated. " "Use base_uri instead.", DeprecationWarning, ) base_uri = spec_url se...
(self, schema: Union[Mapping[Hashable, Any], jsonschema_path.paths.SchemaPath], base_uri: str = '', spec_url: Optional[str] = None) -> NoneType
[ -0.007625778671354055, -0.03744661062955856, 0.0059409597888588905, 0.019196726381778717, -0.03154278174042702, 0.021703068166971207, 0.03273097425699234, 0.014611047692596912, 0.006191594060510397, 0.03403056040406227, 0.0020944203715771437, 0.06535055488348007, -0.027217021211981773, 0.0...
4,338
openapi_spec_validator.validation.validators
is_valid
null
def is_valid(self) -> bool: error = next(self.iter_errors(), None) return error is None
(self) -> bool
[ 0.053349267691373825, 0.0022439989261329174, -0.015644654631614685, 0.0396319180727005, -0.022349506616592407, 0.012559155933558941, 0.03327995166182518, -0.036374498158693314, 0.018603475764393806, 0.01012514065951109, 0.047739267349243164, 0.0048454091884195805, 0.08244886249303818, 0.00...
4,340
openapi_spec_validator.validation.validators
validate
null
def validate(self) -> None: for err in self.iter_errors(): raise err
(self) -> NoneType
[ 0.023840535432100296, -0.007099257782101631, -0.021263642236590385, 0.06676032394170761, -0.05962693691253662, -0.03648608922958374, 0.03179306909441948, -0.028653014451265335, 0.06986625492572784, -0.00014879002992529422, 0.0329364612698555, -0.006011330522596836, 0.07850141078233719, -0....
4,341
openapi_spec_validator.validation.validators
OpenAPIV30SpecValidator
null
class OpenAPIV30SpecValidator(SpecValidator): schema_validator = openapi_v30_schema_validator keyword_validators = { "__root__": keywords.RootValidator, "components": keywords.ComponentsValidator, "content": keywords.ContentValidator, "default": keywords.OpenAPIV30ValueValidator,...
(schema: Union[Mapping[Hashable, Any], jsonschema_path.paths.SchemaPath], base_uri: str = '', spec_url: Optional[str] = None) -> None
[ 0.0556502602994442, -0.09899011999368668, -0.013966876082122326, -0.011079362593591213, -0.039791565388441086, 0.004181916359812021, 0.029110481962561607, -0.025471670553088188, -0.009821167215704918, 0.020927684381604195, 0.025616498664021492, -0.03928466886281967, 0.02054751105606556, -0...
4,346
openapi_spec_validator.validation.validators
OpenAPIV31SpecValidator
null
class OpenAPIV31SpecValidator(SpecValidator): schema_validator = openapi_v31_schema_validator keyword_validators = { "__root__": keywords.RootValidator, "components": keywords.ComponentsValidator, "content": keywords.ContentValidator, "default": keywords.OpenAPIV31ValueValidator,...
(schema: Union[Mapping[Hashable, Any], jsonschema_path.paths.SchemaPath], base_uri: str = '', spec_url: Optional[str] = None) -> None
[ 0.05381164327263832, -0.08093561977148056, -0.029305528849363327, -0.006040174979716539, -0.03621378168463707, -0.005126649513840675, 0.026524050161242485, -0.03661373257637024, -0.019452180713415146, 0.027560288086533546, 0.043122030794620514, -0.02766936458647251, 0.02923281118273735, -0...
4,359
openapi_spec_validator.shortcuts
validate
null
def validate( spec: Schema, base_uri: str = "", cls: Optional[SpecValidatorType] = None, ) -> None: if cls is None: cls = get_validator_cls(spec) sp = SchemaPath.from_dict(spec, base_uri=base_uri) v = cls(sp) return v.validate()
(spec: Mapping[Hashable, Any], base_uri: str = '', cls: Optional[Type[openapi_spec_validator.validation.validators.SpecValidator]] = None) -> NoneType
[ 0.049937035888433456, -0.008030757308006287, -0.012917865999042988, 0.013261138461530209, -0.019476167857646942, -0.012737196870148182, 0.06561914831399918, 0.0016203791601583362, -0.03884393349289894, 0.04451695457100868, 0.05185213312506676, 0.019187096506357193, 0.02343282848596573, -0....
4,360
openapi_spec_validator.shortcuts
validate_spec
null
def validate_spec( spec: Schema, base_uri: str = "", validator: Optional[SupportsValidation] = None, cls: Optional[SpecValidatorType] = None, spec_url: Optional[str] = None, ) -> None: warnings.warn( "validate_spec shortcut is deprecated. Use validate instead.", DeprecationWarnin...
(spec: Mapping[Hashable, Any], base_uri: str = '', validator: Optional[openapi_spec_validator.validation.protocols.SupportsValidation] = None, cls: Optional[Type[openapi_spec_validator.validation.validators.SpecValidator]] = None, spec_url: Optional[str] = None) -> NoneType
[ 0.05000549554824829, -0.024209290742874146, -0.0018249537097290158, 0.003023957135155797, -0.029481379315257072, -0.010200345888733864, 0.03815652057528496, 0.0022117646876722574, -0.057481635361909866, 0.041436146944761276, 0.03618169203400612, -0.026025427505373955, 0.004773973021656275, ...
4,361
openapi_spec_validator.shortcuts
validate_spec_url
null
def validate_spec_url( spec_url: str, validator: Optional[SupportsValidation] = None, cls: Optional[Type[SpecValidator]] = None, ) -> None: warnings.warn( "validate_spec_url shortcut is deprecated. Use validate_url instead.", DeprecationWarning, ) if validator is not None: ...
(spec_url: str, validator: Optional[openapi_spec_validator.validation.protocols.SupportsValidation] = None, cls: Optional[Type[openapi_spec_validator.validation.validators.SpecValidator]] = None) -> NoneType
[ 0.05386031046509743, -0.027209768071770668, -0.005749526899307966, 0.021617522463202477, -0.0377127043902874, 0.005142244044691324, 0.041103001683950424, 0.011123324744403362, -0.019223343580961227, 0.03243502229452133, 0.023365098983049393, -0.04868748411536217, 0.029062198475003242, -0.0...
4,362
openapi_spec_validator.shortcuts
validate_url
null
def validate_url( spec_url: str, cls: Optional[Type[SpecValidator]] = None, ) -> None: spec = all_urls_handler(spec_url) return validate(spec, base_uri=spec_url, cls=cls)
(spec_url: str, cls: Optional[Type[openapi_spec_validator.validation.validators.SpecValidator]] = None) -> NoneType
[ 0.03455502167344093, -0.026289599016308784, -0.0009951932588592172, 0.03387781232595444, -0.03366943821310997, 0.018579835072159767, 0.0543503575026989, -0.021583864465355873, -0.030352851375937462, 0.03816680237650871, 0.0460849367082119, -0.011755652725696564, 0.050113461911678314, -0.01...
4,365
dagster._core.libraries
DagsterLibraryRegistry
null
class DagsterLibraryRegistry: _libraries: Dict[str, str] = {"dagster": __version__} @classmethod def register(cls, name: str, version: str): check_dagster_package_version(name, version) cls._libraries[name] = version @classmethod def get(cls) -> Mapping[str, str]: return cl...
()
[ 0.07485050708055496, -0.06582127511501312, -0.06044058874249458, -0.00656922860071063, 0.0222229715436697, 0.03248681500554085, -0.06482621282339096, 0.021909713745117188, 0.011175980791449547, 0.006440239492803812, -0.004408661741763353, 0.006541587878018618, -0.00852249190211296, 0.03445...
4,366
dagster_snowflake.resources
SnowflakeConnection
A connection to Snowflake that can execute queries. In general this class should not be directly instantiated, but rather used as a resource in an op or asset via the :py:func:`snowflake_resource`. Note that the SnowflakeConnection is only used by the snowflake_resource. The Pythonic SnowflakeResource does...
class SnowflakeConnection: """A connection to Snowflake that can execute queries. In general this class should not be directly instantiated, but rather used as a resource in an op or asset via the :py:func:`snowflake_resource`. Note that the SnowflakeConnection is only used by the snowflake_resource. T...
(config: Mapping[str, str], log, snowflake_connection_resource: dagster_snowflake.resources.SnowflakeResource)
[ 0.0393558032810688, -0.12314700335264206, -0.04492127150297165, 0.01624365523457527, 0.008905851282179356, -0.002821382600814104, 0.003166463691741228, 0.03213394805788994, 0.017701277509331703, -0.020031264051795006, -0.04092385247349739, -0.016464507207274437, 0.020340457558631897, 0.015...
4,367
dagster_snowflake.resources
__init__
null
def __init__( self, config: Mapping[str, str], log, snowflake_connection_resource: SnowflakeResource ): self.snowflake_connection_resource = snowflake_connection_resource self.log = log
(self, config: Mapping[str, str], log, snowflake_connection_resource: dagster_snowflake.resources.SnowflakeResource)
[ 0.014730941504240036, -0.0918392688035965, -0.015107174403965473, 0.004828314762562513, -0.04622833803296089, -0.004468964412808418, 0.010997559875249863, 0.07964548468589783, 0.0819607600569725, -0.00320762163028121, -0.05147629603743553, 0.003458443097770214, 0.015097526833415031, 0.0189...
4,368
dagster_snowflake.resources
execute_queries
Execute multiple queries in Snowflake. Args: sql_queries (str): List of queries to be executed in series parameters (Optional[Union[Sequence[Any], Mapping[Any, Any]]]): Parameters to be passed to every query. See the `Snowflake documentation <https://docs.snowflake.com/e...
@public def execute_queries( self, sql_queries: Sequence[str], parameters: Optional[Union[Sequence[Any], Mapping[Any, Any]]] = None, fetch_results: bool = False, use_pandas_result: bool = False, ) -> Optional[Sequence[Any]]: """Execute multiple queries in Snowflake. Args: sql_queries...
(self, sql_queries: Sequence[str], parameters: Union[Sequence[Any], Mapping[Any, Any], NoneType] = None, fetch_results: bool = False, use_pandas_result: bool = False) -> Optional[Sequence[Any]]
[ 0.013330166228115559, -0.07186363637447357, -0.033989038318395615, 0.04100997745990753, -0.032027024775743484, 0.03947114199399948, -0.024544432759284973, 0.007102689705789089, -0.0020702152978628874, 0.02517920359969139, -0.038490135222673416, 0.0017985145095735788, -0.01571536250412464, ...
4,369
dagster_snowflake.resources
execute_query
Execute a query in Snowflake. Args: sql (str): the query to be executed parameters (Optional[Union[Sequence[Any], Mapping[Any, Any]]]): Parameters to be passed to the query. See the `Snowflake documentation <https://docs.snowflake.com/en/user-guide/python-connector-examp...
@public def execute_query( self, sql: str, parameters: Optional[Union[Sequence[Any], Mapping[Any, Any]]] = None, fetch_results: bool = False, use_pandas_result: bool = False, ): """Execute a query in Snowflake. Args: sql (str): the query to be executed parameters (Optional[Un...
(self, sql: str, parameters: Union[Sequence[Any], Mapping[Any, Any], NoneType] = None, fetch_results: bool = False, use_pandas_result: bool = False)
[ 0.02535180002450943, -0.08333159238100052, -0.0030852030031383038, 0.03572995215654373, 0.000418261595768854, 0.005964566022157669, -0.03527040407061577, 0.03241736814379692, -0.020354202017188072, -0.009205345995724201, -0.04480605199933052, -0.012158907018601894, -0.012235498055815697, -...
4,370
dagster_snowflake.resources
get_connection
Gets a connection to Snowflake as a context manager. If using the execute_query, execute_queries, or load_table_from_local_parquet methods, you do not need to create a connection using this context manager. Args: raw_conn (bool): If using the sqlalchemy connector, you can set raw_c...
@compat_model_validator(mode="before") def validate_authentication(cls, values): auths_set = 0 auths_set += 1 if values.get("password") is not None else 0 auths_set += 1 if values.get("private_key") is not None else 0 auths_set += 1 if values.get("private_key_path") is not None else 0 # if authentic...
(self, raw_conn: bool = True) -> Iterator[Union[Any, snowflake.connector.connection.SnowflakeConnection]]
[ 0.051429618149995804, -0.08249473571777344, -0.009219564497470856, 0.03917389363050461, 0.01306104939430952, -0.0423581600189209, 0.059908654540777206, -0.0010303743183612823, 0.03902578726410866, 0.00831704679876566, 0.0015470077050849795, -0.002157942857593298, 0.0455794520676136, -0.036...
4,371
dagster_snowflake.resources
load_table_from_local_parquet
Stores the content of a parquet file to a Snowflake table. Args: src (str): the name of the file to store in Snowflake table (str): the name of the table to store the data. If the table does not exist, it will be created. Otherwise the contents of the table will be repla...
@public def load_table_from_local_parquet(self, src: str, table: str): """Stores the content of a parquet file to a Snowflake table. Args: src (str): the name of the file to store in Snowflake table (str): the name of the table to store the data. If the table does not exist, it will ...
(self, src: str, table: str)
[ -0.01869519241154194, -0.08362817764282227, -0.06541940569877625, 0.0005618538707494736, -0.016290606930851936, 0.000057468845625407994, 0.00290018692612648, 0.06909053027629852, -0.004419113975018263, -0.017107432708144188, -0.03349899500608444, -0.013812599703669548, -0.022907806560397148,...
4,372
dagster_snowflake.snowflake_io_manager
SnowflakeIOManager
Base class for an IO manager definition that reads inputs from and writes outputs to Snowflake. Examples: .. code-block:: python from dagster_snowflake import SnowflakeIOManager from dagster_snowflake_pandas import SnowflakePandasTypeHandler from dagster_snowflake_pyspa...
class SnowflakeIOManager(ConfigurableIOManagerFactory): """Base class for an IO manager definition that reads inputs from and writes outputs to Snowflake. Examples: .. code-block:: python from dagster_snowflake import SnowflakeIOManager from dagster_snowflake_pandas import Snow...
(*, database: str, account: str, user: str, schema: Optional[str] = None, password: Optional[str] = None, warehouse: Optional[str] = None, role: Optional[str] = None, private_key: Optional[str] = None, private_key_path: Optional[str] = None, private_key_password: Optional[str] = None, store_timestamps_as_strings: bool ...
[ 0.030789103358983994, -0.11864238232374191, -0.04514031857252121, 0.00714366789907217, 0.029894813895225525, -0.008815137669444084, -0.013403693214058876, 0.040008798241615295, -0.03819892928004265, -0.01719377562403679, -0.02335798554122448, -0.012498757801949978, 0.0018524563638493419, 0...
4,373
pydantic.main
__copy__
Returns a shallow copy of the model.
def __copy__(self: Model) -> Model: """Returns a shallow copy of the model.""" cls = type(self) m = cls.__new__(cls) _object_setattr(m, '__dict__', copy(self.__dict__)) _object_setattr(m, '__pydantic_extra__', copy(self.__pydantic_extra__)) _object_setattr(m, '__pydantic_fields_set__', copy(self...
(self: ~Model) -> ~Model
[ 0.006834167987108231, -0.0010405840585008264, 0.0468839630484581, 0.015163454227149487, -0.06537912786006927, -0.028610290959477425, 0.007807841058820486, 0.002037329599261284, 0.02100549079477787, -0.015061934478580952, -0.023884980008006096, -0.015606452710926533, -0.004222325515002012, ...
4,374
pydantic.main
__deepcopy__
Returns a deep copy of the model.
def __deepcopy__(self: Model, memo: dict[int, Any] | None = None) -> Model: """Returns a deep copy of the model.""" cls = type(self) m = cls.__new__(cls) _object_setattr(m, '__dict__', deepcopy(self.__dict__, memo=memo)) _object_setattr(m, '__pydantic_extra__', deepcopy(self.__pydantic_extra__, memo...
(self: ~Model, memo: Optional[dict[int, Any]] = None) -> ~Model
[ -0.01730891317129135, -0.014797967858612537, 0.04058132693171501, 0.04257531091570854, -0.07879940420389175, -0.03157145902514458, 0.009757611900568008, 0.011308490298688412, 0.008008257485926151, -0.031331442296504974, -0.015416472218930721, 0.026568029075860977, -0.012434723787009716, 0....
4,375
pydantic.main
__delattr__
null
def __delattr__(self, item: str) -> Any: if item in self.__private_attributes__: attribute = self.__private_attributes__[item] if hasattr(attribute, '__delete__'): attribute.__delete__(self) # type: ignore return try: # Note: self.__pydantic_private__ can...
(self, item: str) -> Any
[ 0.05876484885811806, 0.05346519872546196, 0.018287405371665955, 0.026966936886310577, -0.029328346252441406, -0.1150781586766243, -0.0014792608562856913, 0.053717561066150665, 0.02125268615782261, 0.05281626060605049, 0.02274884656071663, 0.03392498195171356, 0.017935898154973984, 0.044596...
4,376
pydantic.main
__eq__
null
def __eq__(self, other: Any) -> bool: if isinstance(other, BaseModel): # When comparing instances of generic types for equality, as long as all field values are equal, # only require their generic origin types to be equal, rather than exact type equality. # This prevents headaches like MyGen...
(self, other: Any) -> bool
[ 0.03524528816342354, -0.028941573575139046, -0.034729890525341034, 0.0688650906085968, -0.0371086485683918, -0.05883465334773064, -0.012627248652279377, -0.007844951003789902, -0.0291398037225008, 0.002589378971606493, 0.0279900711029768, -0.024976974353194237, 0.07964880019426346, 0.06089...
4,377
dagster._config.pythonic_config.typing_utils
__get__
null
def __get__(self: Self, obj: Any, owner: Any) -> Self: # no-op implementation (only used to affect type signature) return cast(Self, getattr(obj, self._assigned_name))
(self: typing_extensions.Self, obj: Any, owner: Any) -> typing_extensions.Self
[ 0.012309743091464043, -0.05829361081123352, -0.019284971058368683, 0.025760089978575706, -0.047659676522016525, 0.00824305322021246, 0.08443974703550339, -0.00082529237261042, 0.03458660468459129, -0.012572959065437317, 0.01018646638840437, 0.008032480254769325, 0.006071520037949085, 0.002...