diff --git a/Pipfile.lock b/Pipfile.lock index 2993eec..e5b6ccf 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -249,11 +249,11 @@ }, "joserfc": { "hashes": [ - "sha256:06979cfbab78bc802f14c0358f32969826cc26720e13cb38926ffdc86bc0cb2c", - "sha256:471d0fd12a5a0d1c0942de280f39efe6f597878315033270b504d4d006d25510" + "sha256:176b836ac7ed9a46a88629e24076314b475f33a75d0bad7f26146e572eed7c79", + "sha256:cbf03cb2c6db8cc5289f1ef8718842e53dba244b4c0de5fefa0c0eaee4bde8db" ], - "markers": "python_version >= '3.10'", - "version": "==1.7.7" + "markers": "python_version >= '3.11'", + "version": "==1.8.0" }, "pycparser": { "hashes": [ @@ -265,158 +265,157 @@ }, "pydantic": { "hashes": [ - "sha256:7efbf7507b937931cd32a5755acb00ea1cf5ccb1d4e8067a5850d5069e382118", - "sha256:fb7b2db6cefe8414dd612edeede49c4c433acb0432b0f92b95024e45f66c505d" + "sha256:653a2ad9f6d8858529c77c72717d0ea991d6c6837fe683246b2f4b2bbfc3fadc", + "sha256:7c19f1d46f8accf55a4617a6116e1ade64840870f397b846a2c53fb9019414ba" ], "markers": "python_version >= '3.10'", - "version": "==2.14.2" + "version": "==2.14.4" }, "pydantic-core": { "hashes": [ - "sha256:01eb0282d0b3a065d55956d1be9ce398c46db3dd6d277a6cb2358c8aa8c53179", - "sha256:04cf672960b8c4fc28bb159c8cdd101fbd311c520237a5c0360448b851adfb41", - "sha256:0b94a515f44f1ebcb25395bcdba506c4cdaf6d3fcb0466b9658521b41e5ff057", - "sha256:0d090ae76d5b09c003600c7779b3adcf3d1b49268f616c5c51d844e54c8e318d", - "sha256:126f158474346f457c0759c29c1a6334acd5f7f99dd272bb27d19314f3d81b4d", - "sha256:150f6e101f575c21a4ecfed1be1c05bb89a0ad49cb9c846ed377583bd71b32c2", - "sha256:16ec8e07c37f02dcf68939cc7f202ba9a148cc155ee2acf22d337e10b24c2cb7", - "sha256:18f008ef58cd30782f81b6e0119e20b7e884edcefbc2d370162ebe033f6e5c99", - "sha256:196b87b48b2695426920e8470d20f9e99f019ebd86f15808aa018b68086840cd", - "sha256:1a5e859f5a8a6d834b0a13acaa0eaddf1a9b4b015fcda13bab7b471e18299d32", - "sha256:1ac5b99bc7b0a68ec64f5f75a6828a7bab5535c8df0cdc07901deb50e0815910", - "sha256:1b0e8dc3932cf4e9ed5727570325cacc716b9409ffc794a221c0ccc72e8eb775", - "sha256:1b9f652e17a13bbc09b45f74c3c326cca72059ce4dcdef687fcb04389db413a9", - "sha256:1db9cab6197e797824f0479dd2ae5fd2e272aa61c61b7faa5a6e450ca7a0d3b7", - "sha256:1fdf5b52ed22f1404c2433d0b46df2d86d9befb742d0b9b4042a2325c43cdb97", - "sha256:2115d7ca6d58554af8a14da3dd32d361a4fe999fae52f115a6155679b5b00e72", - "sha256:21a902e546032c82b7275552345a2342d862e0541aea7226c91067c396e68b3f", - "sha256:21ea3b00f1e87c66f3f9e92f9f6fec20495ac0e60d7d2e68ba1fc49739d7cf40", - "sha256:23385c4626f8b5a7792aa381ea573d9432cfbf4c21375a0a5eed2a4fb64e0e58", - "sha256:240fec32a74af0979f7253532859b3fd209ad5eea822416bb010929dba445c3d", - "sha256:24120c644322a35b5eb765416ac8442214c45689e255f5fc6e761e7e7c743c8b", - "sha256:26b778d4ebb75f181d36220ff0f54a513fc46f053d9b09ce79993c2f00bc45cc", - "sha256:2d4a043c820363359e40ac96270e1915e5376e116be1f59cee0701775de3e376", - "sha256:31a1fb3ffbd1195b24490f671d12623dd4c9bfa56d6af0a299fa43b516134f5b", - "sha256:33c6800ab9563adaa0d7893e9cd8f5b972ef1e6a23df70498e05c24f3fcec5e1", - "sha256:3435c443da7510a6de1a30c68beae338852a11f0440cc8320ea756a162f38dbe", - "sha256:36917e29c0b815d6b940bc91560fcf453b5b85d55c579796373f0ea11d1c111a", - "sha256:36d8b9725684ca3bf658b90a101d335fc8cae405bb22196b7b5ef41344913756", - "sha256:3939538e640c94ab779a05f2d45dafedd01d65d93e1290797f3ac5b59fcb6455", - "sha256:3b1bb3950e0794a795c9344d818d5b476189b0c9c9755e8eb8fde87c3acee17a", - "sha256:3bfe12243b3ded517c6734d91f127489e2f51bf95cb533b53130fe360333db80", - "sha256:3fbcd402e4b607d4b8de5d4591215f31f042af03f9d09e58f693a6221e32833f", - "sha256:41ed8abeffda6a880207fdc0cd1343a448cec3cc6b38b53f730c0745f745292d", - "sha256:43a8fd56f3c681f3cda2d5c842ad28e88241df742dfcbe8fd1dd437a3056e1f6", - "sha256:48e944091b7bff233920bed8a60b0ed6c96c73d3c5836bf51c4b9a4bfb58e4ca", - "sha256:4ac996e42a93d80122a23edce44e02c6b9c4913f5c6198a077da31475341a39a", - "sha256:4e9392ddf67fe97ab9889f796d468c9908a8754b8b6c7520eb03a65012b9a1e7", - "sha256:4ea01f30e119f1ec7a2034e85c40f491d469896aef02cd6436fd9292fe1be3fb", - "sha256:4eb54c25e3463d73e1e4ed439ffc45d1d7e590df40bc7bb06f11a906afd996c3", - "sha256:4ee64baeab403b9de9c92846c5c1abec28ffb046cbc023bfae059897841f88af", - "sha256:523fe6574aea50f456cbc301c1cdddcbf237939f7657f9af99b4f0f71942b59c", - "sha256:5299296ff5cafcb69851fd652de8f9268a0bb036bcbedbfcaa94cf743baf3986", - "sha256:53bd25e8ab54c02bb4c55d4848c1d36f75f3b9a7356e83179fe27794d9e9e6c4", - "sha256:57bccd3e1128736c792094da1feac6da46ec3feb1957ef649a9b3e4f8de6fa04", - "sha256:596921489390a002d6a5e303384a0f1f98384f8bb550fbf38a1aafa6093da0f9", - "sha256:5ab5738c39b25b5dc5a721270e2269a2f5e86e614375e6c07ee6caab8cbc0f2f", - "sha256:5c12a5a080570a91bbcbf6d10db008b80e3f5dea015ef2f0137bbec70f24f3f3", - "sha256:5d3cd8be71c4da3c9b42cc92f17e5e3036bdca98bf18555a0e072c3fe87abbb4", - "sha256:61e13100b30d8d25fc0d1f0297014b32941bf0975a3584bd08f3adebb68d1ead", - "sha256:6258754c473b3045a7aa30b833a8a331a1ab36c6147cb230789861d80bb26f83", - "sha256:6a438cb8a3f87f2c49e82e43fb19511d4d5043f53e0787dc4df937ccb904373a", - "sha256:6c25b8826be85714b27dafe908d3461e1b09e3e31c0279a7029040c832c781ef", - "sha256:6d47b2d0e00e030e0ebdb08115a37da7294e7a6d196d134a77ed7ee6c142284b", - "sha256:6e731bf5a5e8e25398544d7709e39068ec4230b0177e4db7fa955692fd415ba3", - "sha256:6eb6ff07964f39e33c6f57fefe939514e76b8c0d4a694e5663e2e04e80cc1798", - "sha256:6f5a432c6c1ef18a1a02a04b3616b8d3f2f88b13faa46caae1ac6559ab202234", - "sha256:6ffb4dce3ecb2cd563aa30f9eb5088a1cf1f4f688b90cbb374fa96e49fc50b02", - "sha256:701bc55d08c22f981973ca4f6fdf4ea102ee1ee3a21b818b66fdb161ea711a4a", - "sha256:713d7c33c0e231e3786eb0ec95885814dd65d5f3a09754399b6acbf5e9365f11", - "sha256:71615edeaf1ae70f5f3f558426072eede0168b7e5190fd9633878e29a0b85732", - "sha256:783abdfac21247d33bec40aa683d26bba30d61655c40de38b2decc4797aabf92", - "sha256:7c539d452cba22f250103c7d1c00cbe9038eb705e657476e701c43374efd9f2e", - "sha256:7c6e1bd6cadae13958e52897ef020e85c9916a95917149fca463bb0c0421a7c6", - "sha256:7f9821dfc0c473c96ad55ce4189c7cb4f9c94e7d4f563afb874173243dec1162", - "sha256:823b222c4fc861a82c650998a6117ecbd150cc71bf8b78f9a31bf3f48c456108", - "sha256:83d6f42ae6eba44548a1a3d4f900a5b1500fdd14f09f04754a8800ab0d544432", - "sha256:8431ecb131489cbdaf6f51f7ade47475f73aff4f1912552f75ba19a6cfe233a8", - "sha256:848984e231190ae49bc8b5229e64d2a6fba4231dc6046e1b6b28ddc060bc7601", - "sha256:86e7abd24a67f61a4bfe8df059b67a2bdd8bf33705178e98463195d140bd3780", - "sha256:8772c2c0091e6fc2d0499151793d31bf811826986b0727052935a95104845544", - "sha256:8835566b3e94026da3ce2249f9ee35c9d2ebe4cd131f6a39bfc82708d3010a46", - "sha256:89213368eef163350af37127939ace099010e8102757905c3e329f1175950ed8", - "sha256:91238117cd296352f54f24117ff5a227bdea428865dba1244aa0cdd1424c0bc2", - "sha256:91315aea7adb51821d4a3378ede953bfdd76e3bf71551de4a82d7638cef7dc02", - "sha256:91c92856b846aa690ea6239ffd6c5003c5e3e296a69095570bf4efee5bfa0bdc", - "sha256:928a44ad1e21a7e923eb924d601605f0694cd187d2ce5d40bf7ad76650f4627d", - "sha256:92acf02c770b9d5c4e9a3e8d64e9d95ae26456a86ebb7b7cf64a97f899e5871b", - "sha256:92ada606285dab054e40848a951f583c537cde1e54701ea1305ec0096877012d", - "sha256:93bedc68c4138088ea3c042189c01d2945f530f0dcc36e1ea02df8418bd4f1cd", - "sha256:93eb41d626d9a2749a678823c70bba8c25033cef474ae8001fd7621adbbd8437", - "sha256:95838be125133fa314753f8cc5168f7c41e3a9dd5eef5383dbbbeed511bd4853", - "sha256:9667637665acba166a7dbbc786f14c50512d3a01f7199e0e1a13b929e92d7c7a", - "sha256:98722314e12a8e4fa346e0afd3fff2098b5732875ff45592b450a7b589b43c4f", - "sha256:99e1d482138a71902415ba375bb4627679a5fefd3bd07803c3a8f37632f4981d", - "sha256:9a87744e683d9a13f60b7fa5242c17f8d283ffa94ad727cb19063b48c3d34960", - "sha256:9a8a62281fd9c6a373b3fd3d473685e6838d43341eecde5f47729748e2c11ee3", - "sha256:9b01a092955c1c7530196ad526755cff4f2d11f37ca9a6fc9ebe37ca49a48977", - "sha256:9b2383933b1dd7a8c93e02f99ebfd305f1286057172483b8e6898bed3fef69d3", - "sha256:9e7460abce637f90e37f8c443559fbd687c38884d05cb69ef265e634945f4324", - "sha256:9eff570402175c7d5fff8497d5a9c05580664a79bb66c07b8f205d17f69e580b", - "sha256:9fcde11462e0faab4c2a2ae8cd4516f7dd8239eec583bd88c5524d8064ad2d0c", - "sha256:a1b4d60bad57d6e0e7cd30cc4d1dc646d258dd6dfb7935ce76c7dd72dd1e98b0", - "sha256:a3317630e2791f56071b82f89bb71624146125e4311e6643f708c6ba744b5ac5", - "sha256:a53d5f11cd6d15569ba3e53f3498077f0d5e633f6ec604d2ea613e895017ebee", - "sha256:a55c1163e829a08707b4a92c8ee02a5a3a3847ced74aa4da94e3e975ffe1ec63", - "sha256:a59db03b80a156a6fbeae41096866d1cb89cdf31031ba44c768a804538880636", - "sha256:a786cf782ebb2e45a43c7118d75d452aac982b79577dfe804d8dbf2878f0b589", - "sha256:a88851e8e332588cb8cced8b5318d1163c7d0bb87830aa8dcafbc4ae9602b73c", - "sha256:adec010c824290d4ca87047e8d8bfa4f85ac29f545f326cd5321696805d311ed", - "sha256:aff31602e8518594e6f6bc670cdb27e37cb7dbeb2d5d0b76a7707b70fe951ddf", - "sha256:b0b25d647036972c2951059046cb498f72b7af5a2def27bf8e5f44c3067ab7dd", - "sha256:b0e6a2152706d84f7da8b9d34dcecc7e9bde678af32c40bd5b405f427ae0fbdb", - "sha256:b1adf2f37521b578c438f6ec61d1c1d0c20b076863ddd5d8b6f3ab658857db3f", - "sha256:b29b7c5adf4b2be7c941f7f76432aa3269cd5052ff8610376b8ece24d7b02c51", - "sha256:b2dd65864aad38dbcc57c3d0e2c978d4286e063378137d8fc0c9fcd558943285", - "sha256:b381574614245f18fdb2d6d1aa8f149e225869c47b5ee7f81812de8977817314", - "sha256:b3e681208e2d39fde13fbea449ef2736a85ec1ea2afa41e9193a8c536e71dafe", - "sha256:b5675a12a7b67063fe3ca187e735b0463cf13fabc10166ae4d4b2f775fd0632d", - "sha256:b583ddeee6a6bb5bbc04462167c68034913221139d52d9f155ca6d1637a2fdcf", - "sha256:b62c89545d21d930c333208fd548e7b4f262228ba3a322fd75c987a75ab11f31", - "sha256:b7abcfaf66c1dc14c5ed928c349614f223c972a8b021b4be9548dbea6c817371", - "sha256:b958c217c6e56bef261f516e4caf5d490b079ad6a428752afada5a764cca6c71", - "sha256:bb6d49f00e2babd40af4889d6b9f4bf50879f522dd4e2e22cb705cac5e0c5e8e", - "sha256:bd1fe69056a19c377a6c6de2c1240fb8676ba0512a969965efb486510c5e0f1f", - "sha256:bd6ecae08c0d871cf93b6f0d4ee76b06c65be44ea22311981a022b2f1948cf9d", - "sha256:bf7f99a0e6616cea754e2334d129091f3260d011369d9b8c658522bfb2427619", - "sha256:c1b65a42afc73b39e6ae908ec7b9c3b9898676a7b15ce4c66d4965f7071007c8", - "sha256:c324a7e0c0012e3974053f81a270d8f1aa23227571f4ddd3254c911bb356459b", - "sha256:cb8d2d7b07cbe2d7488de7e53671f836c4f4a8032dcda079df33dc1b7e2397c0", - "sha256:cc488daac19e6f5292180fac5e0ef7efffabeef4e096af9a17a75a7d3d6781f6", - "sha256:d18d56c1ec63b304f4bb3c7db7e0d311e61cca1b1c944590a4b13ac39b2ca92b", - "sha256:d3d049b557875f9d15230eec8a731749a7a873d8ed6a051903b05bdf46e0e65f", - "sha256:d684ff87d00de2f6abcbbfa9b0fdce8b513dd799a900809dcfa7eb62ad69832a", - "sha256:d71a9a9352acbcb5c73d39dd003383599428067b6eda5cf7c5d335a7a0da37e1", - "sha256:d79aaa468193c1bed6b0560d3c5c9f9e369e3efb0b128b38a2537e2d51d42773", - "sha256:d93c066a38f83376b5bc020e563666784d1b680a70d6ceb625fdb541af7a312e", - "sha256:e2e6240a0a5ad847017b3d65187877fdb7a11d5a58d43c30736f9f523478913b", - "sha256:e3d824b6152e1c0fd58dc6266f2de470eb7b2286135294f5f7cd26a0f0693738", - "sha256:e5c801bdf3cc92274b8fc2c7023c8751e5ae81260c009ac558ff55ce712a2d45", - "sha256:e80c47314c7233e7105a7efcfffd89d56e479e558189d1959eeeaf2639a27680", - "sha256:ea71b94a2eb5d2fc102926321f56d2ee8eddfad2673eadb1d23e9f287a492715", - "sha256:eec187d2876abb6a74203efbe2aa796455c1809334acf4e739dde35da8cfb69f", - "sha256:efad0bdc67d3b119c3bab6b94d341a27333c2bb89ed75dfa182a4a06cd0ea329", - "sha256:f078e276848bc23d1f92f46fc88d5b9cbb824b9acc60d9e07116620e502e16a9", - "sha256:f07c965a8aa6d62145f122641f292129984f39a3e3697585b19298a1488287db", - "sha256:f142cd663d1148ed32993ed9a58e5c67ea312f446a01a6c13a956945aafc9f23", - "sha256:f47c1349c3b4274aeb18459d54244881a5c0dee0fdccedffca45704ba5c9e0a0", - "sha256:f5ba7ef10ce82737e173fa95cafa1c8210918f7e653715b2c7a7a31877a74848", - "sha256:f73930dacad5e611fe019e18df6f53c30629b1843d038d303b8dec86a32493bd", - "sha256:f81df206b937d0dca5efb38c25fc99037d82dbcd3740e34c3f81997d2322ac1c", - "sha256:fd9aa71a800c87c0f7ab53fa38009169a23a82c685989626ca74a4bd483e1b67" + "sha256:004c784d4642bd1112a9fa9a022543aa17793fd32004f7e903ee97df2086bad4", + "sha256:00598ae680c6e4a17cda01910e49c0da8ce15610505e6c57cec3f15d83daef88", + "sha256:008de9d97f2b0c8e596fb5d93d49b63be158e8be5ac35856903b338cbcfd21f3", + "sha256:041f4730fa7a8bf975e88436d439bdc72f3f16e584a470ffbe47392628d99de6", + "sha256:05815bbe2c7bec58d1ce456cc0a98f368e6ef9345b1d9311f42b814d34ad7086", + "sha256:07a62d44515d674d750cfd86b7ce1dd93111be870f378d7c27b37aeb78d0cb4a", + "sha256:09c732c097816c89d46ddb70f89d72e853e3a1bbac6475961c60a88aad9fe612", + "sha256:0a7d599d0c5afbab98c0e4441f5b76163c6fcfd2ecf73dd6418e468a7ac452b8", + "sha256:0c9f0002e4ec37db931e4ee8b7dafab2c7288ef66354e74fe16484e60eac6616", + "sha256:0d4edc3350e21e0ef773ef9395227ca072832f05e484cadcf4d8663b63a231c0", + "sha256:0d6e614776c8c99495dcfc6ce8f826277fb4388a5e5cbee23c199cbe39e6dcb3", + "sha256:0dd037d96e98f6db8b69a44ab7d5c20a07fb0a2051775746a9e1b5fc8f52867f", + "sha256:11806d9b4888f1645d74fc24237f21dad559b42fb8930481b3df414997be6ee5", + "sha256:12178e58af383bd4c32b2fe141188bc7e540c5eb33ad550856fa5863b4c31bd5", + "sha256:15124b48e0acb6d24664690e052d50be51901286886bc124090960f1df869f30", + "sha256:159f6bc1b616e0ca0938eb568d87ca03c633d6f06306ac47b9c3e5dd8c14d39a", + "sha256:1793ec63c8f247131aa4dfc8c4da645b9c5872cf26b53ce240f143f59ad116e4", + "sha256:1d53befcfd415bd9212e685372c825e62f29b83820db78512c9d3659f13d29e9", + "sha256:1deb966176b1b66be4281c83f10a0b6b1cecedeb25f53ee894bf27b22376facd", + "sha256:1e740886083ff95530d694e6a3f09ed914bcf92a496d16acd307c6c3484fc36d", + "sha256:1f22c36d952f33bac936273ca0be115693a1d7c1c9496ca7d699e6a338656d6e", + "sha256:20337f547d79911457cd4739bb6699213a53089f946af87633a48fad3f74f5e1", + "sha256:22f5f0c37251611191a55e801a5150aa21f348fa10eac8eac9fa43c29937a7b1", + "sha256:24d23de96195ff9637e5940a7fbde3bea6a355b26fb5f491737dd803aa5d5a93", + "sha256:252ce30d79b47954cc3a49f8a0d812ac24a356627391fcec90a68733c755707e", + "sha256:27bc22dc8d50335bc62296261a7dc4c2572149910ba7c274ef0f945b5be0d570", + "sha256:2cb80e0323b31d4669c4d72a466d99c885e13deb06205aa079ea6594e7ad1ef8", + "sha256:2d785ae9ff0ac485567f27f4fc53712268916e04be4a590160e5bf55b096225a", + "sha256:2f0a86887c644247eff4cc7b9e609042a49833dcd72f84574e7b8beea89729ab", + "sha256:2f5f29ff80ce0cf93102198cddebdbb3411881de177359c770e5c9c99495a6b3", + "sha256:2f6a8c9b8647378c0dc128805e6b98da39d36019a0e7cac134badeaedb14f849", + "sha256:302517f9f5589e07ead02d38fbb443947a211461b39b18f46948b20941fa8d98", + "sha256:30988977d38909df645183a9869a9d12211485639ac4757de18585f0ccb6f3dc", + "sha256:3129b52ee2861d0270db8bd140fc9b53ee9821247ca47fda2613a899ce9a1ea3", + "sha256:372f4ab3e67b2387871950cfa27d94d644c3475e650836ea52e25c2e4fbd7975", + "sha256:3cf575867ecaf89aca440e5a4253d2facf1ca37bab30a4e8c205ec611228126a", + "sha256:3f800fc0f304f3b0e09d07d4287f9f0bc9bfe5319d1d7cabeaf265737c516083", + "sha256:40d5da89a632e6c6c938f93fdf54c534882d258a80f51ccfe1650cdedc12e82c", + "sha256:43917f090dfda561575a72f75814f76a0680964b70d7b44c84e44d217bdeade7", + "sha256:43a6eaee9eeac4a54f2ff6567e1b0ec51651b37a40d862cab2e6fd16109e6528", + "sha256:44e6c35bf3a9b6785db0c083df8a6929343f9c8fc27186991d21653242c77c19", + "sha256:470bbc2495367f60d3ca849a8039e4c164701d10637e7743f4427d92651bdb6d", + "sha256:47f4d79fe4876feace216a5b2263c40d792476b4a6508c38d66a2facd3f1f4cc", + "sha256:488319076ec92908b91fc6265ce761f1d78748f69f85518564fd16bf333e1b70", + "sha256:4888829471cd8d85c096ef0e1f41a066c7d76e88309a4fbff4069f70d07673be", + "sha256:48b5deaaee4f1b99603173cd291127523e43ee9f51db58c7ff98d16dc5c6fc93", + "sha256:4ac243e358837f62d085f07b98625fa3831abdb28e8f77196934345bbff0fb0b", + "sha256:4ae5c9f84dfa43643d10328a212f709c7602c5e70df376d217ae5770d374ccd9", + "sha256:4dcf7b2cdfb9c59c1d377de318f3c8462121f32db939299999484ea0b1eadf18", + "sha256:5027c263fbceb821cfb4b385d36d485e19efca1d9adcc4e5bec69c04ca3cdc83", + "sha256:50d12ba7cab98b355ba65d65655e969f66934ab7a3d2d0c8abd61ae2282efce5", + "sha256:5274f8314ce3be1df07ae8ebceeb97a73b8409d842fd7677c5d0a85a68793ec1", + "sha256:55e0d60384a9b14641749d2ba6721f82409248288f066b95d555c6dd484273d2", + "sha256:568e928322f0b6b94671fc1a4dbc867627af74695b0c060ac6d4f25b6a7425d8", + "sha256:57b79401d870c9df395799c596d81875b647ecf3030129d86659a54f6bfcc0db", + "sha256:57d4350167130c9c136b7efa35e6e7ee9539779698755b01007834d32c7a1f7d", + "sha256:5da0e7da9d7cdc39df85d1b927b77d40218cf40acbfc523048c95ce44d33abb9", + "sha256:5eafde2cd1d97b7f60efc423d8504b22defd9d2fb9c4a358ffd1230e5fe65311", + "sha256:5ec2e8caf5eadea7be683fc7025d60563e920f1f52fe18ae46c49558e67b8cd0", + "sha256:5f33c92da4aa5714fb6fcb086358274598e8ff62b6607afd132a38657aa64f02", + "sha256:639a51931869c0594d8723b2f529c547db1aa33dc9571d001dc205d896170c08", + "sha256:63a0ba0d7ccf37c8c724bb7ed13c3aa0aa4c743f4f5f376c92c47e584844c7b1", + "sha256:655d0cc2ddbc3fb1f4f8a8e3724552ee2ba6b8561289e9e6e06186982b27bceb", + "sha256:65b0f52abcd06dbb53961db9cc3610929f4f6518c3726d965a9babdaf7bd79c9", + "sha256:679f15dd3bd2a82bde350ec8c94c0f8f05f05dba39fb3464cd4136a724da9844", + "sha256:68334f281460fb2a85bbb9e2545438bf2fd2c9a166823a60b84541a3c8f2d2e0", + "sha256:6a069ceeca397bd8da2e8ef6383595c63ea17de37d5f2d5cde729bdc0dfe6774", + "sha256:6e01a2033691ea2cbd91e499d6b6573f446dc926ccdfc670ed576991cef85cdb", + "sha256:706c75cd9f8bd1798367f463ea81df52eff5fb2e4c4ef83997dd4ae538adc109", + "sha256:71633f82d51d4796a48026bd6eca5ec83e4a0edbe6187d59bbc45ace1111ebae", + "sha256:736782cfbca37b4d81e6f3c7a3414de25db045dcdb7a05e55b64191a33c5ac45", + "sha256:7c3faea08d44b4a7b57b30f1113e6404e6aa62a4f3489a22359fb27d6003d8b1", + "sha256:7dfc0431e94659ae8449303ca4fb1588dc1e00282d6636d00d72bb4bd6459b4d", + "sha256:851a78a30265bb203186fd0e19712c1a4431083eb5a1e1715f758a029cd8aa6e", + "sha256:86bd5aad5ccbaced98139d08b4314f253c086897830f4bcf9c1d1f02f740683d", + "sha256:887424ba7c2145e97f131bc2cc73383a8c464d7bcd56eb98bbd941afb6868b95", + "sha256:88b543705849d0c59343f97c38296dbf59eb7b3c9565bd4fe1ed638ba38da5ed", + "sha256:8ba2dcbeea0ab8836e804c54e905075125c702cf78e592d998eecf2764b64144", + "sha256:8bbe282e79dc71b24ba7be284eacf27c8ddff8f26911e2030a0dd123c6aed326", + "sha256:8c7244134b93ce028e9166c1b5d3e4537349307ccf3e65d746b4c6b1bbed8c89", + "sha256:90dabbf4f38f37de1663ce932d37c6f694a005f6470ae2f0d97755d9e3f90ffd", + "sha256:90ff55049623eccbfa997332e2b91358dc2c4c30ca6e664b45438723cbe181df", + "sha256:922455cc5baddb0f2c82b7ba649e57e89183442b32fe512670db6ebb9b66b251", + "sha256:92c0ebab606f982730aaaa741a30cd5e0f68dc7c005a5baa9b332fc182232c61", + "sha256:93a10c0b967c0dc6c2253d3a82b9117d2a841b8e344c637edc0a14220852b115", + "sha256:93ee3b4f9c64fb1c39892413c4196d0a84790a7e0e5d72b463882c432c1ffafe", + "sha256:98b92dad690e6578cc0b504eda53d53adaa4f34bd09c97a547a957e419544eb7", + "sha256:9e255e7c32d9c2f396d3daa833e7d8d701eec7bf8e13ca092b4b83ce7d9487fd", + "sha256:9f2bf218dbc93363fe3e31cc53d36db8d6ff4122179406bec05f33bb79c0e2c1", + "sha256:a5f6622451fa3cd71c8ff15df24307cb3f8b5dc35a723de281646c34872d7179", + "sha256:a9bcf23628860d5a90cacdc188ee3b7d0547a38eb985214f03e7002a6ca0e558", + "sha256:aa69eaeed433cfe5de809fb84c95536a5aed991b28290d0db059fe6766c69274", + "sha256:ad0e0221deec2a2385300d76b9259da7036c0ed784502c154ae237dafd67605f", + "sha256:af453c0c20372ca8acf3c46de2a89b242491853dc61d0171ba24608d33310e09", + "sha256:b2910ec0fa5aeb9bef70156f2b79f4783978fdcfaa7b2f1b5d1814458d2e79a1", + "sha256:b2b64d3204f9c33f03ed3111eb754902ea76ca5aa61ab4b2bdf9f767a4a1f279", + "sha256:b43115385de7db83bd2fe7a08dea8580bce3acc3f54200c4f4fe32a4a49688d4", + "sha256:b66f2434c895652ac21c030d5a3a92c7811f0f9b98af41bf35be899c2d34aa4c", + "sha256:b6f48c4bf1c77ace644b125f168418438fbc9b8e4c3b290915cc7d055d83c8b1", + "sha256:b7e6a76b77513cd633a08addfda8409623ad884a4d91ee3664fb05cf094b2c35", + "sha256:b9348cfd798b8199d34da5258becf2fc8f5e4e7a3b51da30c34b81b996a07b34", + "sha256:ba2b34529984a8e3cb1bc62a7687617722695a2cb4e57958de32a0eba128a07a", + "sha256:baa107902f8e38011a5f79836d905eb6bfaac1d4b0bd09fc86509b711d0b09c8", + "sha256:bb103c150e1a0f1b8b2710a66ce1f741c7922b22ef07a290aea0e6cf702d8bbf", + "sha256:bcc830e4f48499fd30a870f07c30752273ae2ddccce34d65d51c9fc880c380ab", + "sha256:bcd9d9b38e61dfd43e00f621ce00da2ffed35047fad532c4afcadf4f9ca0d672", + "sha256:bdafd6b05bf012772b7d7325a98d26f19b7918e21dabdd5970c885262245aae3", + "sha256:be4615d4b5f90c65dce2295dcf32eff7f05ea5d0d3a82421c03c572785cb9bf8", + "sha256:c334b8759496f9e597b68e1309b2fb3d824fd24a29e562afa86b61005eb9d54d", + "sha256:c415a8da7c89a3dd32d988a9117bf0a52371769b77b0943bcfd50b281ecefb8d", + "sha256:c4c4313dc66f45822b3d7f39aa74e59e7987cf7572b3309005b26d956a0098a9", + "sha256:c69eb2e09d2830949e6e8f395d4eb8c714ba083213ccff64932ded681fe69a4e", + "sha256:cbec4aad328be58961c738b83fc2c7bd993242d2366f949d914e8c09266dee0e", + "sha256:cbfde3ad127786f1dea1a6cd89a5eb824a16203f24743ad2b4e07506f43bc844", + "sha256:d16cb794449c2bc0e5cb0ab0022813419bf5283266f2a7ff1fc54e5c6e27dcee", + "sha256:d34c0d4dd4a318f2be788a60a972c3a1ed5da0155a7c06d6dd810dc5d60ad704", + "sha256:d3ada66d0601feeeba504a6daac73e47ed164357e46930366f135c4121594d53", + "sha256:d4ebf349b1b60049e80df5d9ea6725b1b7e434a7d006474b0f664fa72a6b3c75", + "sha256:d7826407ed74ff8e6cc6e6df7ffbf180e9b449ab1516f28eb5f6e2a489bc5129", + "sha256:d84b427c6badf48adc2586be1dc5c8677fc2f22a09da50e5d3f342d3daf3b2b4", + "sha256:dac78f91e263c4c9a4d587b9d97b3b5b2561293b33247452cc3cfe5b500e8cfb", + "sha256:dc5717ed8981efdbbafc15a2533a690703cf80e96b886a158c61c9ec9bafcc28", + "sha256:e0a7ae307b4e1eff195cd23a757da07f70a115e45175039caf5f3979a20c7edb", + "sha256:e5d5d77a9446f44688a5ef420d92c9facac0865ef5565215db54be184ab7906f", + "sha256:e65f78eb3d930ac30ff3557fc74a0771300096fb002f588a6fe8d946e83f14ad", + "sha256:e7dd59f498ef42077f22db607571249db41997227018cb84644ba0059f8b5719", + "sha256:e8faa73de2e9231f604cfa44c471d0986e7e9c45129d7888839a34196e46a7df", + "sha256:e8fe516a4b3b06e4ff83b9adee4a786d28a617e5fb5fe90bda49fb6f52a5ac19", + "sha256:e93587aaa5660536b9188686e8fe0544b577ec57d896d424b5b2118b151a6845", + "sha256:ea215f7f5d2df866e3b5448c0bbb4a35285086ac6ab18687796704cbd5f2c5a3", + "sha256:ea7429e3adb2f2fd81e2d6e8942e5c1cd760a6e6be5b7574d2ee5499b5e19e67", + "sha256:ed4a01922af0d41b2a3b9433818cbb73b6b28e8dea344c90917c1fdcceb9960f", + "sha256:ef461e9299ae665fab67c6f054847178b8fd510da10b4ef745a074b922efbf0a", + "sha256:f20c692c599ebac7f04f3a0102b969f3f9d6667ffe1e72629fc7fbf8b6375234", + "sha256:f33be114a0ee27870cffd31057ed60bf5a0cd522dcbdc1dda0bdad70f8302cb0", + "sha256:f7509c6f8a0f9d9eac58340dd567f0eb71ce2f762df09f0d51280e30da3fe687", + "sha256:f8dc2008577c5e02eaa1eb3fbfa8fe0eba9af27ff6a740e9f1dae6661e88efcb", + "sha256:f8fd7e9c44bb4c9214d41c3bef79cba5a513b29c3bcbfdaaf0440ca6f5fb65ea", + "sha256:fa66340c6d3e08a276803812e7665312dfc75dd24eedfa8e09f18a0f8e3e0e8f", + "sha256:feb8c87dbc4684777ddafbf37c922d9e2748272ba61e362ebf85db73ebda6234" ], "markers": "python_version >= '3.10'", - "version": "==2.50.2" + "version": "==2.50.5" }, "typing-extensions": { "hashes": [ @@ -428,11 +427,11 @@ }, "typing-inspection": { "hashes": [ - "sha256:547274fa6b0a561ccf549cc9524b999a578e737d015d8709d021f9d0d13bea47", - "sha256:65b8397ba37ccbce054456aaccddfc91e6e3083c92824df348d96ca832f3f147" + "sha256:7f16c411e7930dc79596d42ab44672a3fe5f60eb34b781a1647e7872363120c7", + "sha256:bc210535442b39e1bf2805e0c7a17dfd6a4ace760c84c7f7d16245d23a6b1c39" ], "markers": "python_version >= '3.10'", - "version": "==0.4.4" + "version": "==0.4.5" } }, "develop": { @@ -465,128 +464,128 @@ "toml" ], "hashes": [ - "sha256:032d4c2db4c677eb71d43f2f8b80bf64e9346f7a3f7b6ebb13f1782f3cc6c274", - "sha256:03baf0688e14a5a44ffd1eefa8928dfc92b14565e521174e072b31b971aa1657", - "sha256:045c1eeb19fb4eae949850a761102fffb3a5f638b97f977912f95843e54f6669", - "sha256:09e563b49c81cd0a33734e926d7a4a6ef1778d74304cde2dcc3aff8b30ea1036", - "sha256:0a9cb9a0fb58e6fff5442969af36094ecd6976f4907f179e33b27e15355d8f74", - "sha256:0b8bb651a4406fb6a983a905309fec1783443c65e1771b41e92740a0f4a1176b", - "sha256:0cfdc938ca3319d873d1f1252e60620a39aee4ebf9dbd7cc58238109ebda9c51", - "sha256:0d0fac604a962ff546beb038cba9a5a09d88e6e3f01612fb46f7bd4fe5dc8dca", - "sha256:0edeb6594f080c8de1263cccb239cb316ef77aeb959e2e0f38f2953fcc72a49e", - "sha256:11f5f7fb2d97a0fe865f5e7bad4eb0619b957637f676bc088d13844adf26ba95", - "sha256:12961f738d717a046d4bf3f8d1727eb3ebe2ed5478ff96cd6233d4dfc39323d3", - "sha256:12cb8a20ad904a5811e6660d829a586b216e5254b9b34b76dde8a4d65d827dc6", - "sha256:194562ab1eff0d85aee8a17ce4c5c0bc1ebf70a629a7145257123156ad100fd6", - "sha256:1cabb31531002fef5197de5df3c84730aef01e750e25154b9813a2583435aba2", - "sha256:1ee0a982b0e1230b3edf768a7dd022bd2377303763895327ac62deb5efacee03", - "sha256:2bf3ee38a40c0570c316b9e7507c472469586906a20f289705898528c31aaea8", - "sha256:2c680e838ff9e68d491158625ca2c1ddb17d78d791bba96a31f8b839b4990438", - "sha256:2dc9233f39149b5a4f4aba17a4b6bc5cca22e52cfc4b06fdb07d014439b8b2ea", - "sha256:2ed3097c6817bc1a7fc8ae0a6131db74aa1150d863cccc308237ff362d3226b2", - "sha256:3067608b4429629f640c1b23d2f69b05d2fd45e00ebb6ee9e8fad220a6c11722", - "sha256:30f5477aac9c9e4a0a641c55f8f8fddd7f3bd91176c912c50f40ffced96b4034", - "sha256:337f87e62e1c5f43c8198d879f677c342d152f84d3f157add12558853cbb8eaf", - "sha256:3393209f6894713161ee82a9b0e673e58237e0f9733c6638e7a6c0c620ef0b33", - "sha256:34d65c9e8e257f48a654908005046fbf1bc48d9540ae3776ad08c0acd010e10c", - "sha256:38c86e5d74bbfd88a393fa3f91257c1225c63aa6db6d5918de3e49ab04f91c6e", - "sha256:3a4459b0f389dd1e51aac3dbfc4ca35b30cae7dc99caa3c0a086d1997a985709", - "sha256:42e6f170d1ac04b7eb3363310a6c41cdfd82c1fe6bf9ffbc4a86f380bdf091c7", - "sha256:4343a9378b964eb3cb80fa90406385de91c7e982a769ca9314d848f93bc0d3f2", - "sha256:460679f53893081edb94eeed011d26be37228ba649b853fd2aed7e4394fb1f35", - "sha256:4e153f0bd6509dbf837fd585f489b3328bfd98f2a718a0b15ae63032148b285c", - "sha256:50678474e714c684b82c108e63fbb8f1bcf1266d8293a49980f1d08526f093b5", - "sha256:55939ea4c097fda2edabf80fac5e49bef15597b950a9f29fc56292a895245feb", - "sha256:559f748446ee799803686b5784e3deb54c70d655ac386a860e06b11672504ba7", - "sha256:58a304efdf2253fb2ea03d45d0a04cc174a92a0cd5279c28c5bb893ce7410968", - "sha256:5900055351ec89fdffb34b27898815106529ded29a9496464c1ebd6313fd40fa", - "sha256:5b7fa0997b8eba7378ac66f31ec7f70164490353ab79b9667d37c0d365e50177", - "sha256:5cc15faaf318ee5040d835a62c75bc6f122d837274f3b5efd47bf9fbd4ac5b85", - "sha256:5ebfbc87836529a31d25c2dec1262c38eea852ec1c46c0f690a515a7339d9c5b", - "sha256:5ee9c8bd13a59e301dc2aefe7aa8384633406808de051b1982775667094eb673", - "sha256:600e121e412cd6bdb52ec105b95c6a04da0c9710d1534f6e64a42db667907802", - "sha256:6052e878b628abcd38fa5f2b64abebc686eed4e2267da42434017a9c6d24f241", - "sha256:61cde5222f1933d476647c5a25ed1a8678b7703098cb5a15f4a0aa39967d8c28", - "sha256:62bb77987d3f72a0aaa77c567ee7f9806bc2e748c8f46fafbe1fdb90dd148398", - "sha256:66efc0fb99cee34626fc17d3adac9c3cd816bfdad563bb1e983c3ef432f566d4", - "sha256:6a80a11b90c4a03df1502304cf24ff953255b6b5d076ef79066ecf88baaff31f", - "sha256:6abfb6a4cf1cb1b67bc8fccdde177e2d2b781d0d34449e7078156547025140e5", - "sha256:6ae0453a3390e67f7bfbe34417bbdf5b4ebfc21db23fb446a0a41115eeeca6ca", - "sha256:6b4593d2871c4c801656dd5861e759f8f5156febd6b6061b02f6a72d64618b7b", - "sha256:6cc31f27240d4e080437e3b8229d92f1d809c9a4f233607385373b73974e183e", - "sha256:6e09612b1b82c9df1d2b6c85dee88d5aad3e73d77a8ec0b16ac6a7322cbdf5d9", - "sha256:72edd4f9483ae30cd1ba4f230687840ef7b58a16afb1c9e81131fd6d64655f36", - "sha256:791f9ee09814dd30d9562b4f4eb037a371485ec1c830b53999d2320d20c4e764", - "sha256:79cf71e5f9a48877ccfed5baa2c72f45af4feeaa596249e23eb15b473134830e", - "sha256:7b5abcae74750302ac4bc77351eaee87c450e4abd3b6225eacde3858e260f8b2", - "sha256:7c570293f001ea91598b90e90cb9b98fddee833e90bbede432cbd218331ccd8e", - "sha256:7d6d9d396c8b7bcaf76d774a10140b218111484e54c73a5f2a1b75655381748e", - "sha256:7fef12cec4b96f59e09761cbd4fc9bdf4788062d1ae435b920241fc16c8a9549", - "sha256:804fbaf81d09b34e2f8b1159d01e211a50713d743d32fd9b2ca6cf0ae507a66f", - "sha256:84538c040f4e6214f663459d89372ce4e6b2bbdd9d397ef0dca7b3ecd56b8eb2", - "sha256:85682ca89bc4601125dcdff23fa70e6274e13c9ad502fba845e6c274ab2c6569", - "sha256:85932227e9dd38e62cd29c17fefdfecfb919eead6af1e3259522d03cf85de983", - "sha256:88a1a9fb0075b83389dd9b403bb3fce976031b3c2aa0e05e3e57143cf639de69", - "sha256:8d823d66afd59566030539c49c7a6acaf3083996682be2dda760c63555842094", - "sha256:8e8113d3852e9377421a61de1917df27b3abb25404a4ecf69f9e64612c4345b5", - "sha256:912a29f338798541d795e2e25903c6fe7a99dee70a40fe4706a9a124649b523e", - "sha256:91e487ad07c511da77b574820141a7c2da09bc2a4b4090b5be2424295d100697", - "sha256:96151262832f3c230ebae23b2d6911ad549e1738465946c97004913ff06112ba", - "sha256:968c5fb6e0c83cab752d79a70209648ce4d90cae815c60fa229b59e264601062", - "sha256:99a7b390cbccc6bf029ca4da3f0f607c218bb4085e9cd6b58a90d14ca12993c3", - "sha256:9a66074231799d8884d267234d49f60c90b43a945dfe069646b72f3058cd4e67", - "sha256:9c083e253e96fdeeaf48133fe836cac86ace2db215d235700e7f7532420a200c", - "sha256:9d1fdf82c6fea57b5e9dada509f9ce9638c8334664e2c98c7f6f1ccf3d143ad2", - "sha256:a01ef92caeedfa4f2ad171a3a8e6fece4565de871d8bca428151bf9929f41048", - "sha256:a14e8d69464da9cbe1dc29e7116dbd37296d1d51a695327c478e250349085089", - "sha256:a1762e85cbbe3b5ff9c6dcbcc1b89d5c72320094292b7b9572bf882c85e428b7", - "sha256:a25cc5e8c23a590815c6a7aa43624234d25cb23b21b484adb8a0daed59860db5", - "sha256:a32ee5831b15ba239bef5d272ae586ca8acea4a661b5f2941f5a0d380e518b23", - "sha256:a3914e2c98c34b94c26d2add3d2a61ccfd3534fc4eaa879ee290bdbb5184ba6c", - "sha256:a59c3b470ac3b2432af3598a996affbeb10236cd899a005c1c4e517fcff8b592", - "sha256:a5e2e0625dfc789af0b2e10acfc106b352f314fffbd19e6392a7961c8cbe5d9a", - "sha256:acdb5f3c96046efff9dc6c572a6acb2b8d0da09372d7b9a9ed7249cf7d17434f", - "sha256:adabc1079ba844b096799ba8638d8df434aca1613f95bb7d5791af320cf05559", - "sha256:adbf3450c0f3f2b2854e282a8758f2b3eddf787eeff24ec9c9bc2cbc38328cc1", - "sha256:aed06129a9f530a948928260d7d2d81c47261355b0127e3c782251b38958463c", - "sha256:b2afebb96da9a1bbca142f8cc12320c14e5c215e0a49cded4f191f5a31506a28", - "sha256:b609df3d6d900464207532c5170a65c6ede8d2e0b91f151f90008a866395cd76", - "sha256:b88fb4d4d7608cbcebdc7ff7dbffc2115e3b81d6c33a79147cd79d54fcb080f4", - "sha256:bac487dce0d2aff28ddf1a533a916f771416eee0e493960f611e49037b878e9d", - "sha256:bb5ca66937c55bc85d1a5e9c5900a3e4693a8edf2280a9b3672b7b2661a84b95", - "sha256:bd04fd23206be9ad3de13b0b39313094fafa66a1f6baf70f5471c004a9fac47d", - "sha256:bd3e9eb493631ff1ca34bf5efac25b5c66724f837bf6182c4fc771c55946423d", - "sha256:bfb6f868af552c0ceb2d19220b8cbcc2be096ca26163ac30e682a13041433429", - "sha256:c2c48a36bb970b7265b196032bfd4237c0b373f2b25ef7012d7e905b5b35c19c", - "sha256:c3e11b81faafb1f063248735c3e2c5c4183fc1db2c7f46782170dd7760dffcbc", - "sha256:c7c5672ecf1b497de7a0b37743bef40e3b58e3207e9fe2ed6682cb0420836a88", - "sha256:c86a39539d10d666bb819c16c94d7edfc1aa2e0531b937f7c549b83d15177c6e", - "sha256:c8a58baa8eb6154c6645eadcc19b6c089deab78c24a612a83206f2a8a5992a7c", - "sha256:c9ac886242bbd50fb35a2242ba79555a99891e657da33f98b7ca968e3488a350", - "sha256:cbf0b83ce927de6053279ba61342d9f8892afde1385fcba9144cd05d4023d109", - "sha256:cc010a0a7fbdd9bb8bdfd0d3f04a5151275860213cbd7e2b876b29778489c712", - "sha256:cd7397de6cc782f00fe5ac1d75e9b306bcfa49c8b6b8dd6ed1f7709393ad40b3", - "sha256:d45cdc495671fc99268ff3653e0da4244972e9fc0e1fc3ea9de18781ad28963a", - "sha256:d472ee1c64868a917a47f02ffb4ac8c22b477f7589d57a3eb0c58b1ad4f0137c", - "sha256:d523da3c2e4bca49417768bcdb1a443c5b359dc44b8b93a3102e118fce912c40", - "sha256:da94ec0484e84fce5c7bf8d0f54b97767a90d992653a129b35634699d516e0a5", - "sha256:db645c81cf4d6bcb392ea1894aad65d55d1588a8472c834b25ca575da3029a56", - "sha256:dc5936491e306f2f6f095bd5fba593de11eb0375cee787ca1f245c3a333a523a", - "sha256:dfb12891a773cbc2132349c77c690a045a882fe3f98b4bda50dfabb01893f9bd", - "sha256:e42a835271922fe7bf98c7a05c78d4032f4e52bf5b07fafa1eadfdfc2f0ad22f", - "sha256:e4eaf11d6b0f2147f46cfbf06fe7edcca6f095d0120da00ddc2458995ee869fc", - "sha256:e65a1e61a68493fbfbe44d8bec71b3231d81b9917f62d3dafe0e105072147e83", - "sha256:e8a72b26dc5c9a9422e45472b1d67ba5caf273c524c8668cc04b23062663755e", - "sha256:e9494d9e99389d39e6a96227749af898d8924ff591cb63944f8a98e68582bf0e", - "sha256:ef65e96f0fc1a7c8b7644c7011d47a8228555e7888ac4d6246f715a7f3d7c398", - "sha256:f1fc9a7cea899c51d8a53e66c2f082a3d9e461ece32418d3ef0a0b90c32bfd3d", - "sha256:f6cdb47a9be2d3313829bed1d296086287682a3ee901ff987b3432b45705b771", - "sha256:f72640e02a470b57b15cd655820133f6892760209283a363a60e2df932d5f0fe", - "sha256:f8bc2cd4c6aa58be1ca243fb8cddb6c3c42031fe4403991ad9cf2b3baed03d9f", - "sha256:fb5745048ee20f796b0e3ab61831049e749acff188563e2af32f58ede957ac1b" + "sha256:0241e03dd65a1edf2e841eb19d8d72dca21ada5c869dcef6c9fde1b166d519a9", + "sha256:0837b71a40749d9c4016cf8c51ba8c6153f7dd40cf4dfa287a2f28376fa50917", + "sha256:0860a5f27ceccd53ee4070acc182588ed4f15b7401cdcca09d8c0cece9c2ad7d", + "sha256:095ad10d17a28c845f2e5f99e398db2f0c680401731ff63a3a1789f2e61ef1e0", + "sha256:0bad8245a15bc7b15d26d25ece243bbf5d1b1229144f3db189014174429b63bb", + "sha256:11116ab42247d55980b51ab49b5c066de9b6baa56fe371fd555e54feae338619", + "sha256:16ed46c0d461a3972e8474268c22bf5d88cdd1088435313edc7e220050c5ac97", + "sha256:17a4bd9edd312744035e1298a6ac30dd7332a7f1ecdc63c9eb0685589b161eb1", + "sha256:1b358585003cf99a13d1327e11582af19154d2cf3dea366fe0d10ce479a5c9f9", + "sha256:1ba5c445d4c7718422753a393bcb0feb6d9834321cdb43dcb585725a392b3edd", + "sha256:1bbbc3e4de867a5e75684d98fc77c20e0687ca3abec69b4421b6f3fb96cd860f", + "sha256:1d26daefd513c4775a6d06846389da9a9e3498b6ddba24982359b75b703dd341", + "sha256:1e7a015f952798d7d5120e8122c160fce7322b0b9d144b9be6af71552a3e68da", + "sha256:203aa5e42c88e9accfa18a0cc91950499efaa5b179a1da14bcbf5b995afdbcb6", + "sha256:21745c08f2835b847a16887b748d3084dddeb0571ae2a0d62e33644413568b99", + "sha256:222bc51858b0f64cb15d51380541712f8d5dc9bb5ce4fd9828bf466503d6debb", + "sha256:228f4bcecadcbb1ec3ed088b0595c5c08f3fca01406b72e8a02209a3af16aff9", + "sha256:22a80bbdee3c22fb3319befaa112a2ed2d6e1417aa75c310f048235170ceca44", + "sha256:24389d7d50f1fe98ac8d8ec1c946656a75b97d953b51a714484e174ed9f48eb1", + "sha256:2765261bdcb5f6c01af41d97ec4fcfe18acd1114d8d2690536a36f86b67c179f", + "sha256:28b05f6b2622551805324196c32f3f20f4fa639bade8ac299ca83073253f6663", + "sha256:28d082105e1ead78de56eb46edde029b5af88e22f8bde74fd092ca164bf15492", + "sha256:2b9a39e25bf0e6fe072c6f3bceaa02f5303b9f975e83f590d118c4e92aacf6d8", + "sha256:320a27997b421ea16eeff42cfd26d40584abd436fb7802ca766d6e8610bc9718", + "sha256:349ab42e0b6b72892f187a60a0890b3a76710e93b7c31579e81648d46230a8ed", + "sha256:35137f71927b7da9292d391409104391b73c5e80d26b6a0d216d871964092351", + "sha256:397e5342fd4f19ae930a5234643a63a8eaccc18a2f034a2f1765a5313123489d", + "sha256:39c063c038b710e0bca3afd4997ccee680674bece468fac13cb8aee9af530d31", + "sha256:3a5691ef42b16e22976ec0352a76a0f7c3b4196fe3d39805dcc765e31ce54f22", + "sha256:3f6d942e066ca009bd1f7ebf5450287a5e9bfc5a6e20a8d8c408a61b433c7f94", + "sha256:42a1f511a334745a66b8f580c4d561e728243e35f3ada0ada35444c4b2fb9fa9", + "sha256:4300ad360b21af19584c4cc82022979544d776ba2fb2df5418b2f3cae1eee6d2", + "sha256:45268757a45946ab3fc9d2c30019aff2d3804ae660121d5b31f523366f604e67", + "sha256:47cd7674a39bad6480e565e2a5b77f8089ebfbcd3aacc572abc6cebabe1f4cc9", + "sha256:47e49fced11190fdc678182b0e7f8947db4fc1c1216094923a1d2bbedba3c84a", + "sha256:499acdc43bf1addf7fecc59a3123847bb96873c07001cfbeb709a71b181fa03d", + "sha256:49a4f12eff115fc2447d3438b2c08d7e5adb3abc811c050ee508f8189718cc5d", + "sha256:49fff24117050f1784447ae8181e75a78b01cfef4b6a8ccba676d466d1d68d9b", + "sha256:4b1300f07904db81508b87a72471e80d37fb6d48debf1168e12edccc81cd0225", + "sha256:4d64248cb7c995aa66dac34c66286c80fb78b13c19bee1503720cc6e55e5de17", + "sha256:4dc3c84002968363c37688e0b325d51a51816c53f3c0cbb925254317c675a789", + "sha256:5559549a14f997b261c936ca463ed67e030511f914ffd1692ad08b3b16ed6034", + "sha256:56b469b63d8270aa67bc919ab8457f4d83115459556a76d09238052a3ab094db", + "sha256:582c5d80b6de5b1909a4222ec1f5676bb2e03815c6be9ff43db2d8a71de5079c", + "sha256:59b4bd56882387b5a957048a77531669d53d641ce8148c23149d2550e9fd4e25", + "sha256:59c15dcae783ed291da3af6be2e70762322637ac886b19671d12123521cf6ac3", + "sha256:61138b3a51d91ee443b04962ec9990fa140208a7a082b1754135ebd1378a420f", + "sha256:620fb331a7d94e3749348cb4a5febcb2ef23ef17192349088e80f4da0cf42647", + "sha256:6695d1bb2a9a2fbd7806d69d78cf30f35eb0f65045da0ec5b5045242fadd6a78", + "sha256:683a204e9773f3127ef836640712270bc4893f10bd7e1ce8a21735dca4c14429", + "sha256:6a8db4bf69a1982cf0fcf16fb11ff17bb2ed3ade5b0e803bb67ad2963a7b1bf3", + "sha256:6d116e2d3b3f3506f634cc48f58dd01497f34a50263e65acfaf6ad7a162f3384", + "sha256:6f8f925262bc0d6fea12d5dde6998aa57f162e05d5a7d50b95d400ab05bb4537", + "sha256:733368982d2799ff04d768916fb755e54d4ce11af3573488ece451745c90d4a7", + "sha256:76a3ddca94ef96b477b7edceac08b1abe0ff26e1ebe1d7000e35bdd17dcde5c4", + "sha256:7c420ffa993c25cc74c263e9c1c869fbaea7d16dcb6448eef4fa6f1905560f5a", + "sha256:7f02996b09190bcdee3b2af38bf2279e4a1a65306afd3e6c229029dbe41e42ea", + "sha256:8009572d242674765b84ecceba126c2392b1824b32f41db1f3323d23d4cb598f", + "sha256:80e219a51ef7ccf78fcd584257e523ece0d390cb3d9d3896660eac05a19ac691", + "sha256:83510c65a385563646297e8dd572e5def63dc300ca08ae15307d99a0225cdfb8", + "sha256:84b5a474040b33f3d805c0b19fadf5a2e78fdd46e0bcb8b813631e5cac64195e", + "sha256:86563b5323fc13239d943b22a1bb9ec60f9ca17bd9a0be09c40a89836697aea2", + "sha256:89f49fa6890f28247135934c4d92abb16828124b2cddb681e2496997c37364fd", + "sha256:8a054b755bc6665b339a923fed14a54446c43c942bf4edf08a59b1225b284c93", + "sha256:8a0aef07b2eaeee9d82ca62241d5c6586aed5dd729300507d2d3f612588c2634", + "sha256:8b713613ed67d5ed88968799e814888b62c6add21f5becad2cae1ec44260e9d0", + "sha256:8b8188229ab3b3769a1c4aaa22357447555416deb440326c665a3bd25fd45ce0", + "sha256:957ba72e11d26b6e6e1abdaa72e41020871f4108c8ff64ff571fc50c81fb57a3", + "sha256:95da285cf77352d4a527e1fd16c1c5c3762e42d1d71cfa9ef2c72a5c796cce36", + "sha256:9e331bc028b44496ad85d4a2656dbad0feb35baf4a66500042c4aaa878ea132c", + "sha256:9e888603ea67c63ba264f39f3459f4cf68adc78dcd9f8bfa65dde601265a40f1", + "sha256:a13a946d8de807d8992e56a09502952d81bfbb4b80204ef77a6a2a38b4ce22be", + "sha256:a1dc44fba727d1cbd8daa88ced7dd867aebef5631b116210f2a2d4da08622d03", + "sha256:a5fa43619c0a53a0424783cc08dbb26a2115e3a890ab566fef811b77d04d5501", + "sha256:b355277f181890fdfc7f49af89f398f8735f031b2f9a5801082e678e9ae85972", + "sha256:b65db089de3f219c850f21a2ca915f43f6fa1da5bfb55871c089d3be82c10369", + "sha256:b6876123ce43459a4b39d5778108010b06164225c3a25c6a43cb85a97f80c549", + "sha256:b6db3399e76a366353dd0c9a009fe74c3d1c892de35863331c4d06fbe0dd83b8", + "sha256:b7028eabf24ad18646dbfc6b352cece01779914e69254ddcacdfb9f805d89f61", + "sha256:b73148d024d086239fc04c03daaeb1934a6d295312dd0d6a04a937326c1207d4", + "sha256:bb2b2f47ad4cc671491c725250ae2a5cadf43a3b0f9136e78f7ecf9506a9fd61", + "sha256:bdf8fefb9f1acb3e92842fb42e29968d053e9545e4e9d9edb5c32a30fab8f899", + "sha256:bf7a43782b20951fe9ddc6f6c28da51c65d3c0d5d5fc3c5a0e566986aa3ec0aa", + "sha256:c38a85dde92c4129641544aca998382f7448a87a17d202765a6adb8a87a33fc7", + "sha256:c45c4e99a09c70e7d6fe101f59fe4556b89d99bfc80cd4e7f5e13ebb6c1e4854", + "sha256:c4ae9befec714c867f42bbea99e1ec25eecdbe51c8faf1cc82164bd65bf4db0c", + "sha256:c53abadc7c4cf7870865fbaf7204e86efbacf93354e010e9188007fe2882a073", + "sha256:c769e6a28bb645c915449ed8ddf6059765a72d8ef79590bfd6202022a4441cd3", + "sha256:cc12f44ac4d5d6be301285c0a4f9c4ae52e673672e284b2a2744e20d24025573", + "sha256:cfb1d2c52bb66e847669000658a5394d50aba835df8e31c2146034f978c8a4cf", + "sha256:d0e0fc055d4436f4b6de83f50cbd9da38af18fb36341b162b408ad7842068a33", + "sha256:d3353cb2ad4254fa433cc53d1ee1fe80eebde529085b238393f3f6d5af821f70", + "sha256:d5a3cd933fdffb958b4046d6f19d3138c7c8a28c439aac800badf61fab6d655e", + "sha256:dc116b251f7a4ae0266dba0ef31a742c6c517d3a99b4d50016548a17d407ac5f", + "sha256:dc6f3c1406fe7e8e2d59eed1f476c5429dcdd11cd3fbe1341acf8ddc4bb9b383", + "sha256:dcd518608b7f869838436ff8d922977e186d1082b9ddad37305ad5282186fd41", + "sha256:dcd6ea389b3da63f467b05c0f47db037a672592ab2035d4bfbb1f662eef4f4a3", + "sha256:df0faa493ab92bbf33ff8bdab442c5b75089baa5ba752844871b5ce9d009a026", + "sha256:e033255f24c1df6e046b6c4e9f91baacae08426beb5296bea8d46176b3a137d8", + "sha256:e04385647f444d55b483a0e4dc519f46134846eddd80910a0d0953ea19e58358", + "sha256:e142166a52ec7edc650b6d3a0b9b1f79dac0ab8843c249e8821ec97a71d1fd2a", + "sha256:e266c693c8bd6541f31cd71eda9b5aa3732adecbd04522880ea3d23d99b202eb", + "sha256:e3948b2e5c3af0133af3e117ee033e6cc656c43d7549d3296e4b3807908dec9f", + "sha256:e4d18e90c87621590a0b1cf2e4caa96f0aa511073f8a1caa3244e09e569564cc", + "sha256:e592f790fee57e2bedaa27cdc76988a082090d1aac560ca4bbea80a7a58436ec", + "sha256:e9396d4d90fb47a1e124a985ac6a3172dbd58334d1de5189f06b75ae96ff69ee", + "sha256:eb25b51a30d07db8493901e3040284f2e756ec2b6549ee392798b9ef4c0607b3", + "sha256:f3347c72d0f4cb3803f4ccdd4331a49a90ef2daa683ce89e2480278400bd2eee", + "sha256:f7ff8b21efcbdf9c7a6c051dc158c9bb9e938b7af33e55ed264d2e529b836d17", + "sha256:f8356475aba020621f8277f1a81c2dbdbda8286c7c6130f242c9816e044062a9", + "sha256:f848ec842cb95fddae4b88830b249e8bade41697f16909688d2af80e8b51e7b6", + "sha256:f8f6252bb4c457d686c18e42965087b30155ff72b0dbda6e79a43ee3682c0870", + "sha256:fa8903475085973b5c916e8a958afd22101b9559880ffbeab5aeac4196768338", + "sha256:fab6f713a1f2f0ab7fb7d55f3aea15d1f3fbd31ace61b585ecd87c8e34f898fb", + "sha256:faee34ea548318f6f9010928edab2f91b36a19b58376e69ab0e76d4f3a0bf9df", + "sha256:fb5945d7360fb258dee758258d93ea624a712fae494e7a0037a92505b3eb8b32", + "sha256:ff0ca078fe63faffff1cff24c804afd4010e35d9c75bb593877b3d4321826c91", + "sha256:ff273110e4e1505ef7a642523ba43f58eb6770ae9e8f869d72efea816cb4bc2c", + "sha256:ff5069e99039739c2fade5dd12cf8df7dc1b1217a0b915110605e0bbdddf1187" ], "markers": "python_version >= '3.11'", - "version": "==7.17.0" + "version": "==7.17.3" }, "dill": { "hashes": [ @@ -862,11 +861,11 @@ }, "mypy-extensions": { "hashes": [ - "sha256:1be4cccdb0f2482337c4743e60421de3a356cd97508abadd57d47403e94f5505", - "sha256:52e68efc3284861e772bbcd66823fde5ae21fd2fdb51c62a211403730b916558" + "sha256:993e7a20aa5671eb41a7132cf555af30062da99729601601b9a8382b11cae768", + "sha256:c6e275a07f1c2fc096b62940452d0eaa3f3af7de45d704787866240a7c6d5a51" ], - "markers": "python_version >= '3.8'", - "version": "==1.1.0" + "markers": "python_version >= '3.10'", + "version": "==1.2.0" }, "packaging": { "hashes": [ @@ -887,11 +886,11 @@ }, "platformdirs": { "hashes": [ - "sha256:021add1ab113483edbcd4694f5fbb2d688b893ea30d35e1155bb371cf4be0be8", - "sha256:cba2d05fe5e18b26b1fa6f376b8e6234c012abe1f8696c486fface7d0054e931" + "sha256:1e34af590de4d978631b751eb2202f2fee4497537a17c1720b12fcf57b331392", + "sha256:96893d686e84e9e6f358a9ea41a8de544df66dbf2ba6cda250e7dc73acf85b9b" ], "markers": "python_version >= '3.11'", - "version": "==4.14.3" + "version": "==4.14.8" }, "pluggy": { "hashes": [ @@ -911,12 +910,12 @@ }, "pylint": { "hashes": [ - "sha256:9928603068edfa0d1a3c167f174b099d4b97c3db75d32d0fcdd029770b4713a9", - "sha256:a85357cae24f33ad8d86c8f3daaa92c600ae4012b54a57299cee76000e9364cf" + "sha256:4c9176dc6c9f1b98b742195f01899b290369d5a27b4b41d1014c17f2f96b26f1", + "sha256:b39fcc762ec4a7fe385d01b8e170fd996847297cdc0e3850bdda1435c74cfd95" ], "index": "pypi", "markers": "python_full_version >= '3.10.0'", - "version": "==4.1.3" + "version": "==4.1.4" }, "pytest": { "hashes": [ @@ -929,12 +928,12 @@ }, "pytest-asyncio": { "hashes": [ - "sha256:0755e488cc0a2b9bd2eab7292cc6390d4cbb8390f1020745647bae5a708e0165", - "sha256:f582d9ea4a1c082195abe8bd29a1fe106aeb1cd435e3dad2d3bc2749935c36a2" + "sha256:557f255ee03cc84f84a8d5f438bc9c6e0f714bf86970ae743c7ecb5a38d7e07d", + "sha256:92c8fa83ca419fd0d4bd6a34df6520dae435841d3733c319343249492adf37f7" ], "index": "pypi", "markers": "python_version >= '3.10'", - "version": "==1.4.1.post1" + "version": "==1.5.0" }, "pytest-cov": { "hashes": [ @@ -956,28 +955,28 @@ }, "ruff": { "hashes": [ - "sha256:029c37cbd3de48ca37aa12117bead2d065f15da17d66bf84e0d4274013705db2", - "sha256:27bb571ac78fef178fe5118d2827df95c2aae74a48fff2b15f6acd03af5ff5bb", - "sha256:39405f341deec934b4289634324ad695f72df2970f9121582872eaf5b722f0f5", - "sha256:4590b9d86c0b1543ebb09094254e191cd43fe8edaf330baa035aab03da251532", - "sha256:46539cb031b01fd29ae0a02142483c46640b233ee12bb1c1b690bffa1555d5ca", - "sha256:56b8ffb3f3b3cbccb8b76b71b38261b7ed982ef5d20f5b447b1b61a7f4949b24", - "sha256:68074094f55ca3d29ab19491f640282f7a84061c4c7977aa5094b968ca457e9a", - "sha256:692fdb46d0fd9c71e380947dc5fc72f2c3f881073bc1f739e4579376231affbe", - "sha256:6a754c0341bc9ca151b7b335988b3263921c08859f84ca219b70cee825571b6f", - "sha256:7fa4b0f931cdbcb8a52044f370a3eb429fb42eb88807b0e800fcaa98dd42b24e", - "sha256:81fce74bcd6be0e9da7c67c7553fd0f1f12964a2052cd728ef917b937a5ca1d9", - "sha256:a57049c8addb3662073859bb55a7ad35aa54f8a7c9ed268911d1333c5aadaaa9", - "sha256:ab5fa7ed5ce18554ea69d850ad162cbaa0c85fc47c08d83a569f806681c9a6ad", - "sha256:ab86b84cd9d05e56d329742c0cabdcbe2d1d56c98f4a04aab9b5b66196febfb4", - "sha256:b75cc113b3aca388933d8296b667b1ac401a80317ea3074c9b0a66541199da29", - "sha256:bbde18beccd98c29a227c63c99022e3443b99258e08326df6425dfe0443705ef", - "sha256:c673c170e27834d1262e3a9c1e97bdc9b9c3b180c63d89173ce69747232474c1", - "sha256:e407b4a6852853a9a2cdce96963e94ad9775578bb44e7561a0f2829f3cc04b11" + "sha256:0692088e6b33455572fb18465e891b443f196e98dc1986825685c77ff6f4c5ac", + "sha256:084d9c8f5ec718e7eba007dba339e7cb4f7571d2f267558ae080bf428fb6a69b", + "sha256:1939b3d701c7b6981b7cf93473de5bf88b129b9ba84efaed5154cc517c44634d", + "sha256:1a0bea6aa1216e0ec4cd35d3dbccec0d772a7c2aad28ec9c6e82571dff2c20b0", + "sha256:2b04276561331300325040bdca21460770029ec574d4c479099e39e8ad1ed43c", + "sha256:3db61f5015600543a581b07fa7f6f64afa0eeedefe16034cadd88c4074087582", + "sha256:435241c61af5909a022f76219d3d1bf24730dc1bf0acabb5ddf4b569ab3cbb30", + "sha256:6a12c50a33936dc00db2be21ba25fb168a8b95c55eda2a3ac85005af69885e4b", + "sha256:9cd2fd9923e9806b8b6b67a3469e2258e84bd4d21e45d5a1a690afdfb9c8e57d", + "sha256:9d44ef2140402043fd6f689ef541858b80883a8b0a02e38539ef0614ebe57d0c", + "sha256:9fbddc08577592e283c265d865e0182de6e33db185494db7b06290d989d888e5", + "sha256:aa3b08254a732acba246891089a152c47c5733dc36b8ecb76ce8602f8326e5e4", + "sha256:b5aba93b3db4b70c5697e4fee6e0d5b9c8452a9a3a03679611cadc25915a2173", + "sha256:c2f4af6670b7a0501904e881bb3f1f24bd0d964dec1eedbd85f0eb73786e1128", + "sha256:d006bbb2945edb17b0ce6a0c1b5f5a8d81ba11dbac294a0a925effa22ce34feb", + "sha256:d8b14e1473dc86ab9069cf7a2ba5041dc012f59110201844ed04cfddf07055a0", + "sha256:fb589e032806bb942e4fb526f30b80a1a64112147ed9f1d38cc3de2e255b6f45", + "sha256:fd661702202a89c00a4c9d0339008805fa5876bfa1c57e165495c2e62230dfbf" ], "index": "pypi", "markers": "python_version >= '3.7'", - "version": "==0.17.3" + "version": "==0.17.6" }, "tomlkit": { "hashes": [ diff --git a/README.md b/README.md index aaa021c..0538de0 100644 --- a/README.md +++ b/README.md @@ -150,6 +150,27 @@ with CaptureClient() as client: ) ``` +On a composite IKG, set `location` on the nodes. Each node is written to the +database of its location, and `create_proxy=True` also puts a proxy of it in the +global database. A relationship goes to the database its source and target +share, or to the global database when their locations differ. Such calls return +the GIDs per location in `BatchResults.by_location` (nodes without a location +under `LOCATION_DEFAULT`, proxies and cross-location relationships under +`LOCATION_GLOBAL`); calls without any location fill `BatchResults.results`. + +```python +from indykite_sdk import CaptureClient + +with CaptureClient() as client: + results = client.upsert_nodes( + [ + {"external_id": "ada", "type": "Person", "location": "east", "create_proxy": True}, + {"external_id": "kitt", "type": "Car", "location": "west"}, + ] + ) + print(results.by_location) # {"east": ["gid:..."], "west": ["gid:..."], "global": ["gid:..."]} +``` + ### Read the graph with a knowledge query (ContX IQ) ```python diff --git a/examples/capture_nodes.py b/examples/capture_nodes.py index 37992cf..f483b90 100644 --- a/examples/capture_nodes.py +++ b/examples/capture_nodes.py @@ -26,7 +26,7 @@ def main() -> None: {"external_id": "kitt", "type": "Car", "properties": [{"type": "model", "value": "K.I.T.T."}]}, ] ) - print(f"Upserted {len(results)} nodes") + print(f"Upserted {len(results.results)} nodes") client.upsert_relationships( [ diff --git a/indykite_sdk/capture/__init__.py b/indykite_sdk/capture/__init__.py index e31158a..56d97cf 100644 --- a/indykite_sdk/capture/__init__.py +++ b/indykite_sdk/capture/__init__.py @@ -3,8 +3,11 @@ from indykite_sdk.capture.aio import AsyncCaptureClient from indykite_sdk.capture.client import CaptureClient from indykite_sdk.capture.models import ( + LOCATION_DEFAULT, + LOCATION_GLOBAL, BaseProperty, BatchResult, + BatchResults, DeleteNodeProperties, DeleteNodePropertyMetadata, DeleteRelationshipProperties, @@ -17,9 +20,12 @@ ) __all__ = [ + "LOCATION_DEFAULT", + "LOCATION_GLOBAL", "AsyncCaptureClient", "BaseProperty", "BatchResult", + "BatchResults", "CaptureClient", "DeleteNodeProperties", "DeleteNodePropertyMetadata", diff --git a/indykite_sdk/capture/_ops.py b/indykite_sdk/capture/_ops.py index 3b25b9f..2efde1b 100644 --- a/indykite_sdk/capture/_ops.py +++ b/indykite_sdk/capture/_ops.py @@ -10,7 +10,13 @@ from indykite_sdk._core.models import IKModel from indykite_sdk._core.ops import RequestSpec -from indykite_sdk.capture.models import MAX_BATCH_SIZE, BatchResult +from indykite_sdk.capture.models import ( + LOCATION_DEFAULT, + LOCATION_GLOBAL, + MAX_BATCH_SIZE, + BatchResult, + BatchResults, +) from indykite_sdk.errors import RequestValidationError @@ -29,36 +35,57 @@ def coerce_items[ModelT: IKModel]( return coerced +def request_locations(items: Sequence[IKModel]) -> frozenset[str]: + """Collect the locations named by the nodes of a batch. + + A node entry carries its own location; a relationship entry is routed by + the locations of its source and target nodes. + """ + locations: set[str] = set() + for item in items: + nodes = (item.source, item.target) if hasattr(item, "source") else (item,) + locations.update(node.location for node in nodes if node.location) + return frozenset(locations) + + def batch_specs[ModelT: IKModel]( path: str, field_name: str, items: list[ModelT], *, auto_chunk: bool, - extra_body: dict[str, Any] | None = None, -) -> list[tuple[int, RequestSpec]]: +) -> list[tuple[int, RequestSpec, frozenset[str]]]: """Split ``items`` into request specs of at most 250 items each. - Returns ``(start_index, spec)`` pairs so callers can report where a chunk - failed. Without ``auto_chunk``, more than 250 items is a client-side error. + Returns ``(start_index, spec, locations)`` triples: the start index lets + callers report where a chunk failed, and the locations of the chunk select + the shape its response is parsed in. """ if len(items) > MAX_BATCH_SIZE and not auto_chunk: raise RequestValidationError( f"The Capture API accepts at most {MAX_BATCH_SIZE} items per request, got {len(items)}. " f"Pass auto_chunk=True to split the batch automatically." ) - specs: list[tuple[int, RequestSpec]] = [] + specs: list[tuple[int, RequestSpec, frozenset[str]]] = [] for start in range(0, len(items), MAX_BATCH_SIZE): chunk = items[start : start + MAX_BATCH_SIZE] body: dict[str, Any] = {field_name: [item.to_wire() for item in chunk]} - if extra_body: - body.update(extra_body) - specs.append((start, RequestSpec("POST", path, json_body=body))) + specs.append((start, RequestSpec("POST", path, json_body=body), request_locations(chunk))) return specs -def parse_batch_results(response: httpx.Response) -> list[BatchResult]: - """Parse a ``{"results": [...]}`` batch response envelope.""" +def parse_batch_results(response: httpx.Response, locations: frozenset[str]) -> BatchResults: + """Parse a batch response in the shape the request selects. + + The API answers ``{"results": [...]}`` when no node of the request has a + location, and ``{"": [gid, ...]}`` otherwise. In the second shape + only the request's locations, plus the default and global keys the API can + add on its own, are read as locations. + """ data = response.json() if response.content else {} - results = data.get("results") or [] if isinstance(data, dict) else [] - return [BatchResult.model_validate(result) for result in results] + if not isinstance(data, dict): + data = {} + if not locations: + return BatchResults(results=[BatchResult.model_validate(result) for result in data.get("results") or []]) + known = locations | {LOCATION_DEFAULT, LOCATION_GLOBAL} + return BatchResults(by_location={key: list(gids or []) for key, gids in data.items() if key in known}) diff --git a/indykite_sdk/capture/aio.py b/indykite_sdk/capture/aio.py index b994776..bb2d459 100644 --- a/indykite_sdk/capture/aio.py +++ b/indykite_sdk/capture/aio.py @@ -11,7 +11,7 @@ from indykite_sdk._core.ops import RequestSpec from indykite_sdk.capture import _ops from indykite_sdk.capture.models import ( - BatchResult, + BatchResults, DeleteNodeProperties, DeleteNodePropertyMetadata, DeleteRelationshipProperties, @@ -40,23 +40,23 @@ class AsyncCaptureClient(BaseAsyncClient): async def _send_batches( self, - specs: list[tuple[int, RequestSpec]], + specs: list[tuple[int, RequestSpec, frozenset[str]]], *, timeout: httpx.Timeout | float | None, - ) -> list[BatchResult]: - results: list[BatchResult] = [] - for start, spec in specs: + ) -> BatchResults: + results = BatchResults() + for start, spec, locations in specs: try: response = await self._send(spec, timeout=timeout) except IndyKiteError as exc: if len(specs) > 1: raise ChunkedCaptureError( - f"Chunked capture call failed at item {start} after {len(results)} successful items.", + f"Chunked capture call failed at item {start} after {start} successful items.", completed=results, failed_at=start, ) from exc raise - results.extend(_ops.parse_batch_results(response)) + results.merge(_ops.parse_batch_results(response, locations)) return results async def upsert_nodes( @@ -65,7 +65,7 @@ async def upsert_nodes( *, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Create or update nodes (``POST /nodes``).""" items = _ops.coerce_items(nodes, UpsertNode, "node") return await self._send_batches( @@ -78,7 +78,7 @@ async def delete_nodes( *, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Delete whole nodes (``POST /nodes/delete``).""" items = _ops.coerce_items(nodes, NodeRef, "node reference") return await self._send_batches( @@ -91,7 +91,7 @@ async def delete_node_properties( *, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Strip named properties from nodes (``POST /nodes/properties/delete``).""" items = _ops.coerce_items(nodes, DeleteNodeProperties, "node property delete") return await self._send_batches( @@ -104,7 +104,7 @@ async def delete_node_property_metadata( *, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Strip metadata fields from one property per node (``POST /nodes/properties/metadata/delete``).""" items = _ops.coerce_items(nodes, DeleteNodePropertyMetadata, "property metadata delete") return await self._send_batches( @@ -116,15 +116,13 @@ async def upsert_relationships( self, relationships: Sequence[Relationship | dict[str, Any]], *, - use_global_db: bool = False, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Create or update relationships (``POST /relationships``).""" items = _ops.coerce_items(relationships, Relationship, "relationship") - extra = {"use_global_db": True} if use_global_db else None return await self._send_batches( - _ops.batch_specs("/relationships", "relationships", items, auto_chunk=auto_chunk, extra_body=extra), + _ops.batch_specs("/relationships", "relationships", items, auto_chunk=auto_chunk), timeout=timeout, ) @@ -132,15 +130,13 @@ async def delete_relationships( self, relationships: Sequence[Relationship | dict[str, Any]], *, - use_global_db: bool = False, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Delete relationships (``POST /relationships/delete``).""" items = _ops.coerce_items(relationships, Relationship, "relationship") - extra = {"use_global_db": True} if use_global_db else None return await self._send_batches( - _ops.batch_specs("/relationships/delete", "relationships", items, auto_chunk=auto_chunk, extra_body=extra), + _ops.batch_specs("/relationships/delete", "relationships", items, auto_chunk=auto_chunk), timeout=timeout, ) @@ -148,16 +144,12 @@ async def delete_relationship_properties( self, relationships: Sequence[DeleteRelationshipProperties | dict[str, Any]], *, - use_global_db: bool = False, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Strip named properties from relationships (``POST /relationships/properties/delete``).""" items = _ops.coerce_items(relationships, DeleteRelationshipProperties, "relationship property delete") - extra = {"use_global_db": True} if use_global_db else None return await self._send_batches( - _ops.batch_specs( - "/relationships/properties/delete", "relationships", items, auto_chunk=auto_chunk, extra_body=extra - ), + _ops.batch_specs("/relationships/properties/delete", "relationships", items, auto_chunk=auto_chunk), timeout=timeout, ) diff --git a/indykite_sdk/capture/client.py b/indykite_sdk/capture/client.py index 6f24e64..2068c75 100644 --- a/indykite_sdk/capture/client.py +++ b/indykite_sdk/capture/client.py @@ -11,7 +11,7 @@ from indykite_sdk._core.ops import RequestSpec from indykite_sdk.capture import _ops from indykite_sdk.capture.models import ( - BatchResult, + BatchResults, DeleteNodeProperties, DeleteNodePropertyMetadata, DeleteRelationshipProperties, @@ -33,6 +33,12 @@ class CaptureClient(BaseSyncClient): Every batch method accepts 1–250 items (models or plain dicts) per call; pass ``auto_chunk=True`` to let the SDK split larger batches sequentially. + On a composite IKG, set ``location`` on the nodes: each node is written to + the database of its location, and a relationship to the database its source + and target share, or to the global database when their locations differ. + The GIDs then come back in :attr:`BatchResults.by_location` instead of + :attr:`BatchResults.results`. + Example:: from indykite_sdk import CaptureClient @@ -49,23 +55,23 @@ class CaptureClient(BaseSyncClient): def _send_batches( self, - specs: list[tuple[int, RequestSpec]], + specs: list[tuple[int, RequestSpec, frozenset[str]]], *, timeout: httpx.Timeout | float | None, - ) -> list[BatchResult]: - results: list[BatchResult] = [] - for start, spec in specs: + ) -> BatchResults: + results = BatchResults() + for start, spec, locations in specs: try: response = self._send(spec, timeout=timeout) except IndyKiteError as exc: if len(specs) > 1: raise ChunkedCaptureError( - f"Chunked capture call failed at item {start} after {len(results)} successful items.", + f"Chunked capture call failed at item {start} after {start} successful items.", completed=results, failed_at=start, ) from exc raise - results.extend(_ops.parse_batch_results(response)) + results.merge(_ops.parse_batch_results(response, locations)) return results def upsert_nodes( @@ -74,9 +80,12 @@ def upsert_nodes( *, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Create or update nodes (``POST /nodes``). + On a composite IKG a node with ``create_proxy`` also gets a proxy in + the global database. + Raises: RequestValidationError: invalid node payloads, or >250 items without ``auto_chunk``. @@ -91,7 +100,7 @@ def delete_nodes( *, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Delete whole nodes (``POST /nodes/delete``).""" items = _ops.coerce_items(nodes, NodeRef, "node reference") return self._send_batches( @@ -104,7 +113,7 @@ def delete_node_properties( *, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Strip named properties from nodes; the nodes survive (``POST /nodes/properties/delete``).""" items = _ops.coerce_items(nodes, DeleteNodeProperties, "node property delete") return self._send_batches( @@ -117,7 +126,7 @@ def delete_node_property_metadata( *, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Strip metadata fields from one property per node (``POST /nodes/properties/metadata/delete``).""" items = _ops.coerce_items(nodes, DeleteNodePropertyMetadata, "property metadata delete") return self._send_batches( @@ -129,19 +138,22 @@ def upsert_relationships( self, relationships: Sequence[Relationship | dict[str, Any]], *, - use_global_db: bool = False, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Create or update relationships between existing nodes (``POST /relationships``). - Set ``use_global_db=True`` to route cross-location relationships to the - global constituent of a composite IKG. + On a composite IKG the database is chosen from the ``location`` of the + source and target nodes: their shared location, or the global database + when the locations differ. To write to the global database explicitly, + set the global location on both nodes. A source or target missing from + that database is created there with only its external ID and type; + upsert the node with ``create_proxy`` first to have a proxy that + carries its location. """ items = _ops.coerce_items(relationships, Relationship, "relationship") - extra = {"use_global_db": True} if use_global_db else None return self._send_batches( - _ops.batch_specs("/relationships", "relationships", items, auto_chunk=auto_chunk, extra_body=extra), + _ops.batch_specs("/relationships", "relationships", items, auto_chunk=auto_chunk), timeout=timeout, ) @@ -149,15 +161,13 @@ def delete_relationships( self, relationships: Sequence[Relationship | dict[str, Any]], *, - use_global_db: bool = False, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Delete relationships; the endpoint nodes survive (``POST /relationships/delete``).""" items = _ops.coerce_items(relationships, Relationship, "relationship") - extra = {"use_global_db": True} if use_global_db else None return self._send_batches( - _ops.batch_specs("/relationships/delete", "relationships", items, auto_chunk=auto_chunk, extra_body=extra), + _ops.batch_specs("/relationships/delete", "relationships", items, auto_chunk=auto_chunk), timeout=timeout, ) @@ -165,16 +175,12 @@ def delete_relationship_properties( self, relationships: Sequence[DeleteRelationshipProperties | dict[str, Any]], *, - use_global_db: bool = False, auto_chunk: bool = False, timeout: httpx.Timeout | float | None = None, - ) -> list[BatchResult]: + ) -> BatchResults: """Strip named properties from relationships (``POST /relationships/properties/delete``).""" items = _ops.coerce_items(relationships, DeleteRelationshipProperties, "relationship property delete") - extra = {"use_global_db": True} if use_global_db else None return self._send_batches( - _ops.batch_specs( - "/relationships/properties/delete", "relationships", items, auto_chunk=auto_chunk, extra_body=extra - ), + _ops.batch_specs("/relationships/properties/delete", "relationships", items, auto_chunk=auto_chunk), timeout=timeout, ) diff --git a/indykite_sdk/capture/models.py b/indykite_sdk/capture/models.py index 482b2bd..755fd1d 100644 --- a/indykite_sdk/capture/models.py +++ b/indykite_sdk/capture/models.py @@ -13,7 +13,10 @@ __all__ = [ "BaseProperty", + "LOCATION_DEFAULT", + "LOCATION_GLOBAL", "BatchResult", + "BatchResults", "DeleteNodeProperties", "DeleteNodePropertyMetadata", "DeleteRelationshipProperties", @@ -36,6 +39,15 @@ #: Every batch endpoint accepts at most this many items per request. MAX_BATCH_SIZE = 250 +#: The :attr:`BatchResults.by_location` key for entries without a location. +#: It is reserved: a node ``location`` must not use it. +LOCATION_DEFAULT = "__default" + +#: The location of the global database of a composite IKG. In +#: :attr:`BatchResults.by_location` it holds the global nodes, the node proxies, +#: and the relationships between nodes of different locations. +LOCATION_GLOBAL = "global" + class Metadata(IKModel): """Provenance metadata attached to a single property value.""" @@ -64,7 +76,13 @@ class Property(IKModel): class NodeRef(IKModel): - """A reference to an existing node by ``external_id`` and ``type``.""" + """A reference to an existing node by ``external_id`` and ``type``. + + On a composite IKG, ``location`` routes the node to the database of that + location. A relationship has no location of its own: it lives in the + database of its source and target nodes when both have the same location, + and in the global database when they differ. + """ external_id: _ExternalId type: _NodeType @@ -82,6 +100,10 @@ class UpsertNode(IKModel): is_identity=True, properties=[Property(type="email", value="millicent@example.com")], ) + + ``create_proxy`` asks for a proxy of the node (external ID, type and + location only) in the global database of a composite IKG. It is ignored for + a node in the global location and in a request where no node has a location. """ external_id: _ExternalId @@ -89,6 +111,7 @@ class UpsertNode(IKModel): is_identity: bool | None = None labels: list[str] | None = None location: _Location | None = None + create_proxy: bool | None = None properties: list[Property] | None = None @@ -134,3 +157,42 @@ class BatchResult(IKResponseModel): """Per-item result of a batch capture call.""" id: str | None = None + + +class BatchResults(IKResponseModel): + """The outcome of a batch capture call. + + Exactly one of the two fields is filled, depending on the request: + + - ``results``, when no node of the request has a location. + - ``by_location``, when at least one node has a location (composite IKG). + + ``by_location`` lists the affected node or relationship GIDs per location, + in request order. Entries without a location are under + :data:`LOCATION_DEFAULT`, and a location where nothing was found has an + empty list. For a node upsert or delete, :data:`LOCATION_GLOBAL` holds the + global nodes followed by the node proxies; an ``auto_chunk`` call keeps + that order per chunk only. + """ + + results: list[BatchResult] = [] + by_location: dict[str, list[str]] | None = None + + def merge(self, other: BatchResults) -> None: + """Append the results of ``other``, keeping the per-location grouping. + + The chunks of one call can mix both shapes. Once any chunk is + per-location, the plain results move under :data:`LOCATION_DEFAULT`, + so that still only one of the two fields is filled. + """ + if self.by_location is None and other.by_location is None: + self.results.extend(other.results) + return + if self.by_location is None: + self.by_location = {} + plain = [result.id for result in (*self.results, *other.results) if result.id is not None] + if plain: + self.by_location.setdefault(LOCATION_DEFAULT, []).extend(plain) + self.results = [] + for location, gids in (other.by_location or {}).items(): + self.by_location.setdefault(location, []).extend(gids) diff --git a/indykite_sdk/errors.py b/indykite_sdk/errors.py index 6e11fb3..d59d829 100644 --- a/indykite_sdk/errors.py +++ b/indykite_sdk/errors.py @@ -160,15 +160,15 @@ class ChunkedCaptureError(IndyKiteError): """An ``auto_chunk`` capture call failed partway through. Attributes: - completed: Results of the chunks that succeeded before the failure, - in request order. + completed: The merged :class:`~indykite_sdk.capture.BatchResults` of + the chunks that succeeded before the failure. failed_at: Index (0-based, in items) of the first item of the chunk that failed. The failure that stopped the run is available as ``__cause__``. """ - def __init__(self, message: str, *, completed: list[Any], failed_at: int) -> None: + def __init__(self, message: str, *, completed: Any, failed_at: int) -> None: super().__init__(message) self.completed = completed self.failed_at = failed_at diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 5853c69..9882099 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -10,6 +10,8 @@ - ``INDYKITE_TEST_ORGANIZATION_ID`` / ``INDYKITE_TEST_PROJECT_ID`` — existing IDs - ``INDYKITE_TEST_KNOWLEDGE_QUERY_ID`` — an ACTIVE knowledge query (CIQ test) - ``INDYKITE_TEST_ENTITY_MATCHING_PIPELINE_ID`` — an entity-matching pipeline +- ``INDYKITE_TEST_COMPOSITE_LOCATIONS`` — optional, two location names of a + composite IKG (see ``test_capture_composite.py``) The application agent must belong to ``INDYKITE_TEST_PROJECT_ID`` and hold the ``Audit``, ``Authorization``, ``Capture``, ``ContXIQ``, ``EntityMatching``, diff --git a/tests/integration/test_capture_composite.py b/tests/integration/test_capture_composite.py new file mode 100644 index 0000000..a2402e4 --- /dev/null +++ b/tests/integration/test_capture_composite.py @@ -0,0 +1,96 @@ +"""Live Capture API test on a composite IKG: nodes and relationships are routed by location. + +It needs a project whose IKG is a composite database, so it is opt-in: + +- ``INDYKITE_TEST_COMPOSITE_LOCATIONS`` — two location names of that IKG other + than ``global``, comma-separated, e.g. ``east,west`` (required to run) +- ``INDYKITE_TEST_COMPOSITE_APPLICATION_CREDENTIALS`` — the application-agent + token of that project; defaults to ``INDYKITE_APPLICATION_CREDENTIALS[_FILE]`` +""" + +from __future__ import annotations + +import os +from collections.abc import Iterator + +import pytest + +from indykite_sdk import CaptureClient +from indykite_sdk.capture import LOCATION_DEFAULT, LOCATION_GLOBAL, BatchResults +from tests.integration.conftest import require_env + + +@pytest.fixture +def composite_locations() -> tuple[str, str]: + """The two regional locations under test, from INDYKITE_TEST_COMPOSITE_LOCATIONS.""" + locations = [name.strip() for name in require_env("INDYKITE_TEST_COMPOSITE_LOCATIONS").split(",")] + assert len(locations) == 2, "INDYKITE_TEST_COMPOSITE_LOCATIONS must name two locations" + east, west = locations + assert east and west and east != west, "INDYKITE_TEST_COMPOSITE_LOCATIONS must name two different locations" + assert not {east, west} & {LOCATION_GLOBAL, LOCATION_DEFAULT}, ( + "INDYKITE_TEST_COMPOSITE_LOCATIONS must name two regional locations" + ) + return east, west + + +@pytest.fixture +def composite_capture_client() -> Iterator[CaptureClient]: + """A CaptureClient for the project with the composite IKG.""" + token = os.environ.get("INDYKITE_TEST_COMPOSITE_APPLICATION_CREDENTIALS") + if not token: + require_env("INDYKITE_APPLICATION_CREDENTIALS", "INDYKITE_APPLICATION_CREDENTIALS_FILE") + with CaptureClient(token) if token else CaptureClient() as client: + yield client + + +def _assert_gids_by_location(results: BatchResults, expected_counts: dict[str, int]) -> None: + """Every expected location holds the expected number of GIDs, and nothing else is reported.""" + assert results.results == [] + assert results.by_location is not None + assert {location: len(gids) for location, gids in results.by_location.items()} == expected_counts + assert all(gid.startswith("gid:") for gids in results.by_location.values() for gid in gids) + + +def test_capture_routes_nodes_and_relationships_by_location( + composite_locations: tuple[str, str], composite_capture_client: CaptureClient, unique_suffix: str +) -> None: + """Capture routes nodes and relationships by location.""" + east, west = composite_locations + client = composite_capture_client + + def node(name: str, node_type: str, location: str | None) -> dict[str, str]: + ref = {"external_id": f"sdk-it-cdb-{name}-{unique_suffix}", "type": node_type} + return dict(ref, location=location) if location else ref + + east_person = node("east-person", "Person", east) + west_person = node("west-person", "Person", west) + west_car = node("west-car", "Car", west) + default_car = node("default-car", "Car", None) + global_person = node("global-person", "Person", LOCATION_GLOBAL) + nodes = [east_person, west_person, west_car, default_car, global_person] + + # Both ends in the same location: stored in that location. + owns = {"type": "OWNS", "source": west_person, "target": west_car} + # Ends in different locations: stored in the global location. + knows = {"type": "KNOWS", "source": east_person, "target": global_person} + + # Only the east person asks for a proxy, so the global location holds the + # global person plus that one proxy. + nodes_by_location = {east: 1, west: 2, LOCATION_DEFAULT: 1, LOCATION_GLOBAL: 2} + relationships_by_location = {west: 1, LOCATION_GLOBAL: 1} + + deleted = False + try: + upserts = [dict(n, create_proxy=True) if n is east_person else n for n in nodes] + _assert_gids_by_location(client.upsert_nodes(upserts), nodes_by_location) + _assert_gids_by_location(client.upsert_relationships([owns, knows]), relationships_by_location) + _assert_gids_by_location(client.delete_relationships([owns, knows]), relationships_by_location) + _assert_gids_by_location(client.delete_nodes(nodes), nodes_by_location) + deleted = True + finally: + if not deleted: + # Always try to clean up, even on failure part-way. + try: + client.delete_relationships([owns, knows]) + finally: + client.delete_nodes(nodes) diff --git a/tests/integration/test_capture_roundtrip.py b/tests/integration/test_capture_roundtrip.py index 189a538..527b66d 100644 --- a/tests/integration/test_capture_roundtrip.py +++ b/tests/integration/test_capture_roundtrip.py @@ -21,7 +21,7 @@ def test_capture_roundtrip(capture_client: CaptureClient, unique_suffix: str) -> car, ] ) - assert len(results) == 2 + assert len(results.results) == 2 capture_client.upsert_relationships([relationship]) diff --git a/tests/integration/test_ciq_reference_values.py b/tests/integration/test_ciq_reference_values.py new file mode 100644 index 0000000..b7993a6 --- /dev/null +++ b/tests/integration/test_ciq_reference_values.py @@ -0,0 +1,108 @@ +"""Live test for a ``2.0-ciq`` write query whose upsert values are ``@`` references. + +The platform reads the referenced values from the graph the policy matched and +writes them on the matched node, so the response carries values the request +never sent. The test builds its policy, knowledge query and graph data in the +test project and cleans up after itself. +""" + +from __future__ import annotations + +import json +from typing import Any + +from indykite_sdk import APIStatusError, CaptureClient, CIQClient, ConfigClient +from tests.integration.conftest import poll_until + +POLICY = { + "meta": {"policy_version": "2.0-ciq"}, + # The _Application subject binds to the caller's own application node, so + # executing needs only the application-agent credential. + "subject": {"type": "_Application"}, + "condition": { + "cypher": "MATCH (subject:_Application) MATCH (owner:Person)-[:OWNS]->(server:Server)", + "filter": [ + { + "operator": "AND", + "operands": [ + {"operator": "=", "attribute": "@subject.external_id", "value": "$_appId"}, + {"operator": "=", "attribute": "@server.external_id", "value": "$server_external_id"}, + ], + } + ], + }, + "allowed_reads": {"nodes": ["server.*"]}, + "allowed_upserts": {"nodes": {"existing_nodes": ["server"]}}, +} + +QUERY = { + "nodes": ["server.property.owner_id", "server.property.owner_email"], + "upsert_nodes": [ + { + "name": "server", + "properties": [ + {"type": "owner_id", "value": "@owner.external_id"}, + {"type": "owner_email", "value": "@owner.property.email"}, + ], + } + ], +} + + +def test_ciq_upserts_values_referenced_from_the_matched_graph( + config_client: ConfigClient, + capture_client: CaptureClient, + ciq_client: CIQClient, + project_id: str, + unique_suffix: str, +) -> None: + """Ciq upserts values referenced from the matched graph.""" + owner_email = f"sdk-it-ciq2-{unique_suffix}@example.com" + owner = {"external_id": f"sdk-it-ciq2-owner-{unique_suffix}", "type": "Person"} + # No region property, so knowledge queries filtering servers by region never see this transient one. + server = {"external_id": f"sdk-it-ciq2-server-{unique_suffix}", "type": "Server"} + owns = {"type": "OWNS", "source": owner, "target": server} + + policy = config_client.create_authorization_policy( + f"sdk-it-ciq2-ref-{unique_suffix}", project_id, json.dumps(POLICY), "ACTIVE" + ) + assert policy.id + try: + query = config_client.create_knowledge_query( + f"sdk-it-ciq2-ref-kq-{unique_suffix}", project_id, json.dumps(QUERY), "ACTIVE", policy.id + ) + assert query.id + try: + try: + capture_client.upsert_nodes( + [ + dict(owner, is_identity=True, properties=[{"type": "email", "value": owner_email}]), + server, + ] + ) + capture_client.upsert_relationships([owns]) + + def referenced_values() -> dict[str, Any] | None: + response = ciq_client.execute(query.id, input_params={"server_external_id": server["external_id"]}) + if len(response.data) != 1: + return None + nodes = response.data[0].nodes + return nodes if nodes.get("server.property.owner_email") == owner_email else None + + # The write is idempotent, so poll until policy, query and data + # have propagated and the referenced values come back. + nodes = poll_until(referenced_values, retry_on=(APIStatusError,), timeout=60.0, interval=5.0) + assert nodes["server.property.owner_id"] == owner["external_id"] + assert nodes["server.property.owner_email"] == owner_email + finally: + try: + capture_client.delete_relationships([owns]) + finally: + capture_client.delete_nodes([owner, server]) + finally: + # The query references the policy, so it goes first. + current_query = config_client.read_knowledge_query(query.id) + config_client.delete_knowledge_query(query.id, etag=current_query.etag) + finally: + current_policy = config_client.read_authorization_policy(policy.id) + config_client.delete_authorization_policy(policy.id, etag=current_policy.etag) diff --git a/tests/unit/capture/test_capture.py b/tests/unit/capture/test_capture.py index d5ef959..68e7946 100644 --- a/tests/unit/capture/test_capture.py +++ b/tests/unit/capture/test_capture.py @@ -11,7 +11,7 @@ NotFoundError, RequestValidationError, ) -from indykite_sdk.capture import Property, UpsertNode +from indykite_sdk.capture import LOCATION_DEFAULT, LOCATION_GLOBAL, Property, UpsertNode from tests.unit.conftest import sent_json NODE = { @@ -35,7 +35,7 @@ def test_upsert_nodes_sends_expected_body_and_parses_results(make_client, mock_a assert mock_api.last.method == "POST" assert mock_api.last.url.path == "/capture/v1/nodes" assert sent_json(mock_api.last) == {"nodes": [NODE]} - assert results[0].id == "gid:node-1" + assert results.results[0].id == "gid:node-1" def test_upsert_nodes_accepts_models(make_client, mock_api) -> None: @@ -78,7 +78,7 @@ def test_upsert_nodes_auto_chunk_splits_and_concatenates(make_client, mock_api) results = client.upsert_nodes(nodes, auto_chunk=True) assert len(mock_api.requests) == 3 assert [len(sent_json(r)["nodes"]) for r in mock_api.requests] == [250, 250, 100] - assert len(results) == 600 + assert len(results.results) == 600 def test_upsert_nodes_auto_chunk_partial_failure(make_client, mock_api) -> None: @@ -90,7 +90,7 @@ def test_upsert_nodes_auto_chunk_partial_failure(make_client, mock_api) -> None: with pytest.raises(ChunkedCaptureError) as exc_info: client.upsert_nodes(nodes, auto_chunk=True) error = exc_info.value - assert len(error.completed) == 250 + assert len(error.completed.results) == 250 assert error.failed_at == 250 assert isinstance(error.__cause__, NotFoundError) @@ -134,19 +134,74 @@ def test_relationships_upsert_relationships_body(make_client, mock_api) -> None: assert sent_json(mock_api.last) == {"relationships": [RELATIONSHIP]} -def test_relationships_use_global_db_flag(make_client, mock_api) -> None: - """Relationships use global db flag.""" +def test_delete_relationships_path(make_client, mock_api) -> None: + """Delete relationships path.""" client = make_client(CaptureClient) - client.delete_relationships([RELATIONSHIP], use_global_db=True) + client.delete_relationships([RELATIONSHIP]) assert mock_api.last.url.path == "/capture/v1/relationships/delete" - assert sent_json(mock_api.last)["use_global_db"] is True + assert sent_json(mock_api.last) == {"relationships": [RELATIONSHIP]} -def test_relationships_use_global_db_omitted_when_false(make_client, mock_api) -> None: - """Relationships use global db omitted when false.""" - client = make_client(CaptureClient) - client.upsert_relationships([RELATIONSHIP]) - assert "use_global_db" not in sent_json(mock_api.last) +def test_upsert_nodes_with_locations_returns_results_by_location(make_client, mock_api) -> None: + """A request with a location is answered per location; create_proxy is sent.""" + nodes = [ + {"external_id": "ada", "type": "Person", "location": "east", "create_proxy": True}, + {"external_id": "bob", "type": "Person", "location": "west"}, + {"external_id": "kitt", "type": "Car"}, + ] + mock_api.respond( + { + "east": ["gid:ada"], + "west": None, + "__default": ["gid:kitt"], + "global": ["gid:ada-proxy"], + "request_id": "not-a-location", + } + ) + results = make_client(CaptureClient).upsert_nodes(nodes) + assert sent_json(mock_api.last) == {"nodes": nodes} + assert results.results == [] + assert results.by_location == { + "east": ["gid:ada"], + "west": [], + LOCATION_DEFAULT: ["gid:kitt"], + LOCATION_GLOBAL: ["gid:ada-proxy"], + } + + +def test_relationship_locations_select_the_per_location_shape(make_client, mock_api) -> None: + """A relationship is routed by the locations of its source and target nodes.""" + relationship = { + "type": "OWNS", + "source": {"external_id": "ada", "type": "Person", "location": "east"}, + "target": {"external_id": "kitt", "type": "Car", "location": "west"}, + } + mock_api.respond({"global": ["gid:rel"]}) + results = make_client(CaptureClient).upsert_relationships([relationship]) + assert sent_json(mock_api.last) == {"relationships": [relationship]} + assert results.by_location == {LOCATION_GLOBAL: ["gid:rel"]} + + +def test_request_without_locations_keeps_plain_results(make_client, mock_api) -> None: + """Without a location the plain shape is parsed and by_location stays unset.""" + mock_api.respond({"results": [{"id": "gid:node-1"}]}) + results = make_client(CaptureClient).upsert_nodes([NODE]) + assert [result.id for result in results.results] == ["gid:node-1"] + assert results.by_location is None + + +def test_auto_chunk_merges_plain_and_per_location_chunks(make_client, mock_api) -> None: + """Chunks of one call can mix both shapes; plain results move under the default key.""" + nodes = [{"external_id": f"n{i}", "type": "Person"} for i in range(250)] + nodes += [{"external_id": "east-1", "type": "Person", "location": "east"}, {"external_id": "p", "type": "Person"}] + mock_api.respond({"results": [{"id": f"gid:{i}"} for i in range(250)]}) + mock_api.respond({"east": ["gid:east-1"], "__default": ["gid:p"]}) + results = make_client(CaptureClient).upsert_nodes(nodes, auto_chunk=True) + assert results.results == [] + assert results.by_location == { + LOCATION_DEFAULT: [f"gid:{i}" for i in range(250)] + ["gid:p"], + "east": ["gid:east-1"], + } async def test_async_capture_upsert_nodes(make_async_client, mock_api) -> None: @@ -154,7 +209,7 @@ async def test_async_capture_upsert_nodes(make_async_client, mock_api) -> None: mock_api.respond({"results": [{"id": "gid:node-1"}]}) async with make_async_client(AsyncCaptureClient) as client: results = await client.upsert_nodes([NODE]) - assert results[0].id == "gid:node-1" + assert results.results[0].id == "gid:node-1" assert mock_api.last.headers["X-IK-ClientKey"] == "app-agent-token-value" @@ -178,7 +233,7 @@ async def test_async_capture_all_endpoints_round_trip(make_async_client, mock_ap [{"external_id": "ada", "type": "Person", "property_type": "email", "metadata_fields": ["source"]}] ) await client.upsert_relationships([RELATIONSHIP]) - await client.delete_relationships([RELATIONSHIP], use_global_db=True) + await client.delete_relationships([RELATIONSHIP]) await client.delete_relationship_properties([dict(RELATIONSHIP, property_types=["since"])]) paths = [request.url.path.removeprefix("/capture/v1") for request in mock_api.requests] assert paths == [