diff --git a/README.rst b/README.rst index 1f80fad..079d497 100644 --- a/README.rst +++ b/README.rst @@ -1,7 +1,7 @@ ============= stellar-model ============= -.. image:: https://img.shields.io/github/workflow/status/StellarCN/stellar-model/GitHub%20Action/main?style=flat&maxAge=1800 +.. image:: https://img.shields.io/github/actions/workflow/status/StellarCN/stellar-model/continuous-integration-workflow.yml?branch=main&style=flat&maxAge=1800 :alt: GitHub Action :target: https://github.com/StellarCN/stellar-model/actions @@ -40,7 +40,7 @@ Example url = "https://horizon.stellar.org/accounts/GALAXYVOIDAOPZTDLHILAJQKCVVFMD4IKLXLSZV5YHO7VY74IWZILUTO" raw_resp = requests.get(url).json() - parsed_resp = AccountResponse.parse_obj(raw_resp) + parsed_resp = AccountResponse.model_validate(raw_resp) print(f"Account Sequence: {parsed_resp.sequence}") @@ -54,7 +54,7 @@ Of course you can use it with `stellar-sdk`_. server = Server("https://horizon.stellar.org") account_id = "GALAXYVOIDAOPZTDLHILAJQKCVVFMD4IKLXLSZV5YHO7VY74IWZILUTO" raw_resp = server.accounts().account_id(account_id).call() - parsed_resp = AccountResponse.parse_obj(raw_resp) + parsed_resp = AccountResponse.model_validate(raw_resp) print(f"Account Sequence: {parsed_resp.sequence}") diff --git a/poetry.lock b/poetry.lock index 6585efa..0607615 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,105 +1,213 @@ +# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand. + [[package]] name = "alabaster" -version = "0.7.12" +version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" -category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" +files = [ + {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, + {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, +] + +[[package]] +name = "annotated-types" +version = "0.5.0" +description = "Reusable constraint types to use with typing.Annotated" +optional = false +python-versions = ">=3.7" +files = [ + {file = "annotated_types-0.5.0-py3-none-any.whl", hash = "sha256:58da39888f92c276ad970249761ebea80ba544b77acddaa1a4d6cf78287d45fd"}, + {file = "annotated_types-0.5.0.tar.gz", hash = "sha256:47cdc3490d9ac1506ce92c7aaa76c579dc3509ff11e098fc867e5130ab7be802"}, +] + +[package.dependencies] +typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} [[package]] name = "babel" -version = "2.10.3" +version = "2.12.1" description = "Internationalization utilities" -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "Babel-2.12.1-py3-none-any.whl", hash = "sha256:b4246fb7677d3b98f501a39d43396d3cafdc8eadb045f4a31be01863f655c610"}, + {file = "Babel-2.12.1.tar.gz", hash = "sha256:cc2d99999cd01d44420ae725a21c9e3711b3aadc7976d6147f622d8581963455"}, +] [package.dependencies] -pytz = ">=2015.7" +pytz = {version = ">=2015.7", markers = "python_version < \"3.9\""} [[package]] name = "certifi" -version = "2022.9.24" +version = "2023.7.22" description = "Python package for providing Mozilla's CA Bundle." -category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "certifi-2023.7.22-py3-none-any.whl", hash = "sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9"}, + {file = "certifi-2023.7.22.tar.gz", hash = "sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082"}, +] [[package]] name = "charset-normalizer" -version = "2.0.12" +version = "3.2.0" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "dev" optional = false -python-versions = ">=3.5.0" - -[package.extras] -unicode_backport = ["unicodedata2"] +python-versions = ">=3.7.0" +files = [ + {file = "charset-normalizer-3.2.0.tar.gz", hash = "sha256:3bb3d25a8e6c0aedd251753a79ae98a093c7e7b471faa3aa9a93a81431987ace"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:0b87549028f680ca955556e3bd57013ab47474c3124dc069faa0b6545b6c9710"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7c70087bfee18a42b4040bb9ec1ca15a08242cf5867c58726530bdf3945672ed"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:a103b3a7069b62f5d4890ae1b8f0597618f628b286b03d4bc9195230b154bfa9"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:94aea8eff76ee6d1cdacb07dd2123a68283cb5569e0250feab1240058f53b623"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:db901e2ac34c931d73054d9797383d0f8009991e723dab15109740a63e7f902a"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:b0dac0ff919ba34d4df1b6131f59ce95b08b9065233446be7e459f95554c0dc8"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:193cbc708ea3aca45e7221ae58f0fd63f933753a9bfb498a3b474878f12caaad"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:09393e1b2a9461950b1c9a45d5fd251dc7c6f228acab64da1c9c0165d9c7765c"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:baacc6aee0b2ef6f3d308e197b5d7a81c0e70b06beae1f1fcacffdbd124fe0e3"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:bf420121d4c8dce6b889f0e8e4ec0ca34b7f40186203f06a946fa0276ba54029"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_ppc64le.whl", hash = "sha256:c04a46716adde8d927adb9457bbe39cf473e1e2c2f5d0a16ceb837e5d841ad4f"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_s390x.whl", hash = "sha256:aaf63899c94de41fe3cf934601b0f7ccb6b428c6e4eeb80da72c58eab077b19a"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:d62e51710986674142526ab9f78663ca2b0726066ae26b78b22e0f5e571238dd"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-win32.whl", hash = "sha256:04e57ab9fbf9607b77f7d057974694b4f6b142da9ed4a199859d9d4d5c63fe96"}, + {file = "charset_normalizer-3.2.0-cp310-cp310-win_amd64.whl", hash = "sha256:48021783bdf96e3d6de03a6e39a1171ed5bd7e8bb93fc84cc649d11490f87cea"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:4957669ef390f0e6719db3613ab3a7631e68424604a7b448f079bee145da6e09"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:46fb8c61d794b78ec7134a715a3e564aafc8f6b5e338417cb19fe9f57a5a9bf2"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:f779d3ad205f108d14e99bb3859aa7dd8e9c68874617c72354d7ecaec2a054ac"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f25c229a6ba38a35ae6e25ca1264621cc25d4d38dca2942a7fce0b67a4efe918"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:2efb1bd13885392adfda4614c33d3b68dee4921fd0ac1d3988f8cbb7d589e72a"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:1f30b48dd7fa1474554b0b0f3fdfdd4c13b5c737a3c6284d3cdc424ec0ffff3a"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:246de67b99b6851627d945db38147d1b209a899311b1305dd84916f2b88526c6"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd9b3b31adcb054116447ea22caa61a285d92e94d710aa5ec97992ff5eb7cf3"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:8c2f5e83493748286002f9369f3e6607c565a6a90425a3a1fef5ae32a36d749d"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:3170c9399da12c9dc66366e9d14da8bf7147e1e9d9ea566067bbce7bb74bd9c2"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_ppc64le.whl", hash = "sha256:7a4826ad2bd6b07ca615c74ab91f32f6c96d08f6fcc3902ceeedaec8cdc3bcd6"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_s390x.whl", hash = "sha256:3b1613dd5aee995ec6d4c69f00378bbd07614702a315a2cf6c1d21461fe17c23"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:9e608aafdb55eb9f255034709e20d5a83b6d60c054df0802fa9c9883d0a937aa"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-win32.whl", hash = "sha256:f2a1d0fd4242bd8643ce6f98927cf9c04540af6efa92323e9d3124f57727bfc1"}, + {file = "charset_normalizer-3.2.0-cp311-cp311-win_amd64.whl", hash = "sha256:681eb3d7e02e3c3655d1b16059fbfb605ac464c834a0c629048a30fad2b27489"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:c57921cda3a80d0f2b8aec7e25c8aa14479ea92b5b51b6876d975d925a2ea346"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:41b25eaa7d15909cf3ac4c96088c1f266a9a93ec44f87f1d13d4a0e86c81b982"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f058f6963fd82eb143c692cecdc89e075fa0828db2e5b291070485390b2f1c9c"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a7647ebdfb9682b7bb97e2a5e7cb6ae735b1c25008a70b906aecca294ee96cf4"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eef9df1eefada2c09a5e7a40991b9fc6ac6ef20b1372abd48d2794a316dc0449"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e03b8895a6990c9ab2cdcd0f2fe44088ca1c65ae592b8f795c3294af00a461c3"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:ee4006268ed33370957f55bf2e6f4d263eaf4dc3cfc473d1d90baff6ed36ce4a"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c4983bf937209c57240cff65906b18bb35e64ae872da6a0db937d7b4af845dd7"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_ppc64le.whl", hash = "sha256:3bb7fda7260735efe66d5107fb7e6af6a7c04c7fce9b2514e04b7a74b06bf5dd"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_s390x.whl", hash = "sha256:72814c01533f51d68702802d74f77ea026b5ec52793c791e2da806a3844a46c3"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:70c610f6cbe4b9fce272c407dd9d07e33e6bf7b4aa1b7ffb6f6ded8e634e3592"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-win32.whl", hash = "sha256:a401b4598e5d3f4a9a811f3daf42ee2291790c7f9d74b18d75d6e21dda98a1a1"}, + {file = "charset_normalizer-3.2.0-cp37-cp37m-win_amd64.whl", hash = "sha256:c0b21078a4b56965e2b12f247467b234734491897e99c1d51cee628da9786959"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:95eb302ff792e12aba9a8b8f8474ab229a83c103d74a750ec0bd1c1eea32e669"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:1a100c6d595a7f316f1b6f01d20815d916e75ff98c27a01ae817439ea7726329"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6339d047dab2780cc6220f46306628e04d9750f02f983ddb37439ca47ced7149"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e4b749b9cc6ee664a3300bb3a273c1ca8068c46be705b6c31cf5d276f8628a94"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a38856a971c602f98472050165cea2cdc97709240373041b69030be15047691f"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f87f746ee241d30d6ed93969de31e5ffd09a2961a051e60ae6bddde9ec3583aa"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:89f1b185a01fe560bc8ae5f619e924407efca2191b56ce749ec84982fc59a32a"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:e1c8a2f4c69e08e89632defbfabec2feb8a8d99edc9f89ce33c4b9e36ab63037"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:2f4ac36d8e2b4cc1aa71df3dd84ff8efbe3bfb97ac41242fbcfc053c67434f46"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a386ebe437176aab38c041de1260cd3ea459c6ce5263594399880bbc398225b2"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_ppc64le.whl", hash = "sha256:ccd16eb18a849fd8dcb23e23380e2f0a354e8daa0c984b8a732d9cfaba3a776d"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_s390x.whl", hash = "sha256:e6a5bf2cba5ae1bb80b154ed68a3cfa2fa00fde979a7f50d6598d3e17d9ac20c"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:45de3f87179c1823e6d9e32156fb14c1927fcc9aba21433f088fdfb555b77c10"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-win32.whl", hash = "sha256:1000fba1057b92a65daec275aec30586c3de2401ccdcd41f8a5c1e2c87078706"}, + {file = "charset_normalizer-3.2.0-cp38-cp38-win_amd64.whl", hash = "sha256:8b2c760cfc7042b27ebdb4a43a4453bd829a5742503599144d54a032c5dc7e9e"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:855eafa5d5a2034b4621c74925d89c5efef61418570e5ef9b37717d9c796419c"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:203f0c8871d5a7987be20c72442488a0b8cfd0f43b7973771640fc593f56321f"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e857a2232ba53ae940d3456f7533ce6ca98b81917d47adc3c7fd55dad8fab858"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5e86d77b090dbddbe78867a0275cb4df08ea195e660f1f7f13435a4649e954e5"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:c4fb39a81950ec280984b3a44f5bd12819953dc5fa3a7e6fa7a80db5ee853952"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:2dee8e57f052ef5353cf608e0b4c871aee320dd1b87d351c28764fc0ca55f9f4"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8700f06d0ce6f128de3ccdbc1acaea1ee264d2caa9ca05daaf492fde7c2a7200"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1920d4ff15ce893210c1f0c0e9d19bfbecb7983c76b33f046c13a8ffbd570252"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:c1c76a1743432b4b60ab3358c937a3fe1341c828ae6194108a94c69028247f22"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f7560358a6811e52e9c4d142d497f1a6e10103d3a6881f18d04dbce3729c0e2c"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_ppc64le.whl", hash = "sha256:c8063cf17b19661471ecbdb3df1c84f24ad2e389e326ccaf89e3fb2484d8dd7e"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_s390x.whl", hash = "sha256:cd6dbe0238f7743d0efe563ab46294f54f9bc8f4b9bcf57c3c666cc5bc9d1299"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1249cbbf3d3b04902ff081ffbb33ce3377fa6e4c7356f759f3cd076cc138d020"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-win32.whl", hash = "sha256:6c409c0deba34f147f77efaa67b8e4bb83d2f11c8806405f76397ae5b8c0d1c9"}, + {file = "charset_normalizer-3.2.0-cp39-cp39-win_amd64.whl", hash = "sha256:7095f6fbfaa55defb6b733cfeb14efaae7a29f0b59d8cf213be4e7ca0b857b80"}, + {file = "charset_normalizer-3.2.0-py3-none-any.whl", hash = "sha256:8e098148dd37b4ce3baca71fb394c81dc5d9c7728c95df695d2dca218edf40e6"}, +] [[package]] name = "colorama" -version = "0.4.5" +version = "0.4.6" description = "Cross-platform colored terminal text." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "dataclasses" -version = "0.8" -description = "A backport of the dataclasses module for Python 3.6" -category = "main" optional = false -python-versions = ">=3.6, <3.7" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +files = [ + {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, + {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, +] [[package]] name = "docutils" -version = "0.18.1" +version = "0.19" description = "Docutils -- Python Documentation Utilities" -category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.7" +files = [ + {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, + {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, +] [[package]] name = "idna" version = "3.4" description = "Internationalized Domain Names in Applications (IDNA)" -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, + {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, +] [[package]] name = "imagesize" version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +files = [ + {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, + {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, +] [[package]] name = "importlib-metadata" -version = "4.8.3" +version = "6.7.0" description = "Read metadata from Python packages" -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "importlib_metadata-6.7.0-py3-none-any.whl", hash = "sha256:cb52082e659e97afc5dac71e79de97d8681de3aa07ff18578330904a9d18e5b5"}, + {file = "importlib_metadata-6.7.0.tar.gz", hash = "sha256:1aaf550d4f73e5d6783e7acb77aec43d49da8017410afae93822cc9cca98c4d4"}, +] [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-mypy (>=0.9.1)", "pytest-perf (>=0.9.2)", "pytest-ruff"] [[package]] name = "jinja2" -version = "3.0.3" +version = "3.1.2" description = "A very fast and expressive template engine." -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, +] [package.dependencies] MarkupSafe = ">=2.0" @@ -109,102 +217,278 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "markupsafe" -version = "2.0.1" +version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win32.whl", hash = "sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431"}, + {file = "MarkupSafe-2.1.3-cp310-cp310-win_amd64.whl", hash = "sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win32.whl", hash = "sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb"}, + {file = "MarkupSafe-2.1.3-cp311-cp311-win_amd64.whl", hash = "sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win32.whl", hash = "sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0"}, + {file = "MarkupSafe-2.1.3-cp37-cp37m-win_amd64.whl", hash = "sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win32.whl", hash = "sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5"}, + {file = "MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl", hash = "sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win32.whl", hash = "sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2"}, + {file = "MarkupSafe-2.1.3-cp39-cp39-win_amd64.whl", hash = "sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba"}, + {file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"}, +] [[package]] name = "packaging" -version = "21.3" +version = "23.1" description = "Core utilities for Python packages" -category = "dev" optional = false -python-versions = ">=3.6" - -[package.dependencies] -pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" +python-versions = ">=3.7" +files = [ + {file = "packaging-23.1-py3-none-any.whl", hash = "sha256:994793af429502c4ea2ebf6bf664629d07c1a9fe974af92966e4b8d2df7edc61"}, + {file = "packaging-23.1.tar.gz", hash = "sha256:a392980d2b6cffa644431898be54b0045151319d1e7ec34f0cfed48767dd334f"}, +] [[package]] name = "pydantic" -version = "1.9.2" -description = "Data validation and settings management using python type hints" -category = "main" +version = "2.3.0" +description = "Data validation using Python type hints" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.7" +files = [ + {file = "pydantic-2.3.0-py3-none-any.whl", hash = "sha256:45b5e446c6dfaad9444819a293b921a40e1db1aa61ea08aede0522529ce90e81"}, + {file = "pydantic-2.3.0.tar.gz", hash = "sha256:1607cc106602284cd4a00882986570472f193fde9cb1259bceeaedb26aa79a6d"}, +] [package.dependencies] -dataclasses = {version = ">=0.6", markers = "python_version < \"3.7\""} -typing-extensions = ">=3.7.4.3" +annotated-types = ">=0.4.0" +pydantic-core = "2.6.3" +typing-extensions = ">=4.6.1" [package.extras] -dotenv = ["python-dotenv (>=0.10.4)"] -email = ["email-validator (>=1.0.3)"] +email = ["email-validator (>=2.0.0)"] [[package]] -name = "pygments" -version = "2.13.0" -description = "Pygments is a syntax highlighting package written in Python." -category = "dev" +name = "pydantic-core" +version = "2.6.3" +description = "" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "pydantic_core-2.6.3-cp310-cp310-macosx_10_7_x86_64.whl", hash = "sha256:1a0ddaa723c48af27d19f27f1c73bdc615c73686d763388c8683fe34ae777bad"}, + {file = "pydantic_core-2.6.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:5cfde4fab34dd1e3a3f7f3db38182ab6c95e4ea91cf322242ee0be5c2f7e3d2f"}, + {file = "pydantic_core-2.6.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5493a7027bfc6b108e17c3383959485087d5942e87eb62bbac69829eae9bc1f7"}, + {file = "pydantic_core-2.6.3-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:84e87c16f582f5c753b7f39a71bd6647255512191be2d2dbf49458c4ef024588"}, + {file = "pydantic_core-2.6.3-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:522a9c4a4d1924facce7270c84b5134c5cabcb01513213662a2e89cf28c1d309"}, + {file = "pydantic_core-2.6.3-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:aaafc776e5edc72b3cad1ccedb5fd869cc5c9a591f1213aa9eba31a781be9ac1"}, + {file = "pydantic_core-2.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3a750a83b2728299ca12e003d73d1264ad0440f60f4fc9cee54acc489249b728"}, + {file = "pydantic_core-2.6.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9e8b374ef41ad5c461efb7a140ce4730661aadf85958b5c6a3e9cf4e040ff4bb"}, + {file = "pydantic_core-2.6.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b594b64e8568cf09ee5c9501ede37066b9fc41d83d58f55b9952e32141256acd"}, + {file = "pydantic_core-2.6.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2a20c533cb80466c1d42a43a4521669ccad7cf2967830ac62c2c2f9cece63e7e"}, + {file = "pydantic_core-2.6.3-cp310-none-win32.whl", hash = "sha256:04fe5c0a43dec39aedba0ec9579001061d4653a9b53a1366b113aca4a3c05ca7"}, + {file = "pydantic_core-2.6.3-cp310-none-win_amd64.whl", hash = "sha256:6bf7d610ac8f0065a286002a23bcce241ea8248c71988bda538edcc90e0c39ad"}, + {file = "pydantic_core-2.6.3-cp311-cp311-macosx_10_7_x86_64.whl", hash = "sha256:6bcc1ad776fffe25ea5c187a028991c031a00ff92d012ca1cc4714087e575973"}, + {file = "pydantic_core-2.6.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:df14f6332834444b4a37685810216cc8fe1fe91f447332cd56294c984ecbff1c"}, + {file = "pydantic_core-2.6.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a0b7486d85293f7f0bbc39b34e1d8aa26210b450bbd3d245ec3d732864009819"}, + {file = "pydantic_core-2.6.3-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:a892b5b1871b301ce20d40b037ffbe33d1407a39639c2b05356acfef5536d26a"}, + {file = "pydantic_core-2.6.3-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:883daa467865e5766931e07eb20f3e8152324f0adf52658f4d302242c12e2c32"}, + {file = "pydantic_core-2.6.3-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:d4eb77df2964b64ba190eee00b2312a1fd7a862af8918ec70fc2d6308f76ac64"}, + {file = "pydantic_core-2.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1ce8c84051fa292a5dc54018a40e2a1926fd17980a9422c973e3ebea017aa8da"}, + {file = "pydantic_core-2.6.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:22134a4453bd59b7d1e895c455fe277af9d9d9fbbcb9dc3f4a97b8693e7e2c9b"}, + {file = "pydantic_core-2.6.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:02e1c385095efbd997311d85c6021d32369675c09bcbfff3b69d84e59dc103f6"}, + {file = "pydantic_core-2.6.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:d79f1f2f7ebdb9b741296b69049ff44aedd95976bfee38eb4848820628a99b50"}, + {file = "pydantic_core-2.6.3-cp311-none-win32.whl", hash = "sha256:430ddd965ffd068dd70ef4e4d74f2c489c3a313adc28e829dd7262cc0d2dd1e8"}, + {file = "pydantic_core-2.6.3-cp311-none-win_amd64.whl", hash = "sha256:84f8bb34fe76c68c9d96b77c60cef093f5e660ef8e43a6cbfcd991017d375950"}, + {file = "pydantic_core-2.6.3-cp311-none-win_arm64.whl", hash = "sha256:5a2a3c9ef904dcdadb550eedf3291ec3f229431b0084666e2c2aa8ff99a103a2"}, + {file = "pydantic_core-2.6.3-cp312-cp312-macosx_10_7_x86_64.whl", hash = "sha256:8421cf496e746cf8d6b677502ed9a0d1e4e956586cd8b221e1312e0841c002d5"}, + {file = "pydantic_core-2.6.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:bb128c30cf1df0ab78166ded1ecf876620fb9aac84d2413e8ea1594b588c735d"}, + {file = "pydantic_core-2.6.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:37a822f630712817b6ecc09ccc378192ef5ff12e2c9bae97eb5968a6cdf3b862"}, + {file = "pydantic_core-2.6.3-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:240a015102a0c0cc8114f1cba6444499a8a4d0333e178bc504a5c2196defd456"}, + {file = "pydantic_core-2.6.3-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3f90e5e3afb11268628c89f378f7a1ea3f2fe502a28af4192e30a6cdea1e7d5e"}, + {file = "pydantic_core-2.6.3-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:340e96c08de1069f3d022a85c2a8c63529fd88709468373b418f4cf2c949fb0e"}, + {file = "pydantic_core-2.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:1480fa4682e8202b560dcdc9eeec1005f62a15742b813c88cdc01d44e85308e5"}, + {file = "pydantic_core-2.6.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f14546403c2a1d11a130b537dda28f07eb6c1805a43dae4617448074fd49c282"}, + {file = "pydantic_core-2.6.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:a87c54e72aa2ef30189dc74427421e074ab4561cf2bf314589f6af5b37f45e6d"}, + {file = "pydantic_core-2.6.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:f93255b3e4d64785554e544c1c76cd32f4a354fa79e2eeca5d16ac2e7fdd57aa"}, + {file = "pydantic_core-2.6.3-cp312-none-win32.whl", hash = "sha256:f70dc00a91311a1aea124e5f64569ea44c011b58433981313202c46bccbec0e1"}, + {file = "pydantic_core-2.6.3-cp312-none-win_amd64.whl", hash = "sha256:23470a23614c701b37252618e7851e595060a96a23016f9a084f3f92f5ed5881"}, + {file = "pydantic_core-2.6.3-cp312-none-win_arm64.whl", hash = "sha256:1ac1750df1b4339b543531ce793b8fd5c16660a95d13aecaab26b44ce11775e9"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-macosx_10_7_x86_64.whl", hash = "sha256:a53e3195f134bde03620d87a7e2b2f2046e0e5a8195e66d0f244d6d5b2f6d31b"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-macosx_11_0_arm64.whl", hash = "sha256:f2969e8f72c6236c51f91fbb79c33821d12a811e2a94b7aa59c65f8dbdfad34a"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:672174480a85386dd2e681cadd7d951471ad0bb028ed744c895f11f9d51b9ebe"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:002d0ea50e17ed982c2d65b480bd975fc41086a5a2f9c924ef8fc54419d1dea3"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3ccc13afee44b9006a73d2046068d4df96dc5b333bf3509d9a06d1b42db6d8bf"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:439a0de139556745ae53f9cc9668c6c2053444af940d3ef3ecad95b079bc9987"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d63b7545d489422d417a0cae6f9898618669608750fc5e62156957e609e728a5"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:b44c42edc07a50a081672e25dfe6022554b47f91e793066a7b601ca290f71e42"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:1c721bfc575d57305dd922e6a40a8fe3f762905851d694245807a351ad255c58"}, + {file = "pydantic_core-2.6.3-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:5e4a2cf8c4543f37f5dc881de6c190de08096c53986381daebb56a355be5dfe6"}, + {file = "pydantic_core-2.6.3-cp37-none-win32.whl", hash = "sha256:d9b4916b21931b08096efed090327f8fe78e09ae8f5ad44e07f5c72a7eedb51b"}, + {file = "pydantic_core-2.6.3-cp37-none-win_amd64.whl", hash = "sha256:a8acc9dedd304da161eb071cc7ff1326aa5b66aadec9622b2574ad3ffe225525"}, + {file = "pydantic_core-2.6.3-cp38-cp38-macosx_10_7_x86_64.whl", hash = "sha256:5e9c068f36b9f396399d43bfb6defd4cc99c36215f6ff33ac8b9c14ba15bdf6b"}, + {file = "pydantic_core-2.6.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:e61eae9b31799c32c5f9b7be906be3380e699e74b2db26c227c50a5fc7988698"}, + {file = "pydantic_core-2.6.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d85463560c67fc65cd86153a4975d0b720b6d7725cf7ee0b2d291288433fc21b"}, + {file = "pydantic_core-2.6.3-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:9616567800bdc83ce136e5847d41008a1d602213d024207b0ff6cab6753fe645"}, + {file = "pydantic_core-2.6.3-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:9e9b65a55bbabda7fccd3500192a79f6e474d8d36e78d1685496aad5f9dbd92c"}, + {file = "pydantic_core-2.6.3-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:f468d520f47807d1eb5d27648393519655eadc578d5dd862d06873cce04c4d1b"}, + {file = "pydantic_core-2.6.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9680dd23055dd874173a3a63a44e7f5a13885a4cfd7e84814be71be24fba83db"}, + {file = "pydantic_core-2.6.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:9a718d56c4d55efcfc63f680f207c9f19c8376e5a8a67773535e6f7e80e93170"}, + {file = "pydantic_core-2.6.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:8ecbac050856eb6c3046dea655b39216597e373aa8e50e134c0e202f9c47efec"}, + {file = "pydantic_core-2.6.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:788be9844a6e5c4612b74512a76b2153f1877cd845410d756841f6c3420230eb"}, + {file = "pydantic_core-2.6.3-cp38-none-win32.whl", hash = "sha256:07a1aec07333bf5adebd8264047d3dc518563d92aca6f2f5b36f505132399efc"}, + {file = "pydantic_core-2.6.3-cp38-none-win_amd64.whl", hash = "sha256:621afe25cc2b3c4ba05fff53525156d5100eb35c6e5a7cf31d66cc9e1963e378"}, + {file = "pydantic_core-2.6.3-cp39-cp39-macosx_10_7_x86_64.whl", hash = "sha256:813aab5bfb19c98ae370952b6f7190f1e28e565909bfc219a0909db168783465"}, + {file = "pydantic_core-2.6.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:50555ba3cb58f9861b7a48c493636b996a617db1a72c18da4d7f16d7b1b9952b"}, + {file = "pydantic_core-2.6.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:19e20f8baedd7d987bd3f8005c146e6bcbda7cdeefc36fad50c66adb2dd2da48"}, + {file = "pydantic_core-2.6.3-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:b0a5d7edb76c1c57b95df719af703e796fc8e796447a1da939f97bfa8a918d60"}, + {file = "pydantic_core-2.6.3-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:f06e21ad0b504658a3a9edd3d8530e8cea5723f6ea5d280e8db8efc625b47e49"}, + {file = "pydantic_core-2.6.3-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ea053cefa008fda40f92aab937fb9f183cf8752e41dbc7bc68917884454c6362"}, + {file = "pydantic_core-2.6.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:171a4718860790f66d6c2eda1d95dd1edf64f864d2e9f9115840840cf5b5713f"}, + {file = "pydantic_core-2.6.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:5ed7ceca6aba5331ece96c0e328cd52f0dcf942b8895a1ed2642de50800b79d3"}, + {file = "pydantic_core-2.6.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:acafc4368b289a9f291e204d2c4c75908557d4f36bd3ae937914d4529bf62a76"}, + {file = "pydantic_core-2.6.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:1aa712ba150d5105814e53cb141412217146fedc22621e9acff9236d77d2a5ef"}, + {file = "pydantic_core-2.6.3-cp39-none-win32.whl", hash = "sha256:44b4f937b992394a2e81a5c5ce716f3dcc1237281e81b80c748b2da6dd5cf29a"}, + {file = "pydantic_core-2.6.3-cp39-none-win_amd64.whl", hash = "sha256:9b33bf9658cb29ac1a517c11e865112316d09687d767d7a0e4a63d5c640d1b17"}, + {file = "pydantic_core-2.6.3-pp310-pypy310_pp73-macosx_10_7_x86_64.whl", hash = "sha256:d7050899026e708fb185e174c63ebc2c4ee7a0c17b0a96ebc50e1f76a231c057"}, + {file = "pydantic_core-2.6.3-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:99faba727727b2e59129c59542284efebbddade4f0ae6a29c8b8d3e1f437beb7"}, + {file = "pydantic_core-2.6.3-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5fa159b902d22b283b680ef52b532b29554ea2a7fc39bf354064751369e9dbd7"}, + {file = "pydantic_core-2.6.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:046af9cfb5384f3684eeb3f58a48698ddab8dd870b4b3f67f825353a14441418"}, + {file = "pydantic_core-2.6.3-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:930bfe73e665ebce3f0da2c6d64455098aaa67e1a00323c74dc752627879fc67"}, + {file = "pydantic_core-2.6.3-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:85cc4d105747d2aa3c5cf3e37dac50141bff779545ba59a095f4a96b0a460e70"}, + {file = "pydantic_core-2.6.3-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:b25afe9d5c4f60dcbbe2b277a79be114e2e65a16598db8abee2a2dcde24f162b"}, + {file = "pydantic_core-2.6.3-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:e49ce7dc9f925e1fb010fc3d555250139df61fa6e5a0a95ce356329602c11ea9"}, + {file = "pydantic_core-2.6.3-pp37-pypy37_pp73-macosx_10_7_x86_64.whl", hash = "sha256:2dd50d6a1aef0426a1d0199190c6c43ec89812b1f409e7fe44cb0fbf6dfa733c"}, + {file = "pydantic_core-2.6.3-pp37-pypy37_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c6595b0d8c8711e8e1dc389d52648b923b809f68ac1c6f0baa525c6440aa0daa"}, + {file = "pydantic_core-2.6.3-pp37-pypy37_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4ef724a059396751aef71e847178d66ad7fc3fc969a1a40c29f5aac1aa5f8784"}, + {file = "pydantic_core-2.6.3-pp37-pypy37_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:3c8945a105f1589ce8a693753b908815e0748f6279959a4530f6742e1994dcb6"}, + {file = "pydantic_core-2.6.3-pp37-pypy37_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:c8c6660089a25d45333cb9db56bb9e347241a6d7509838dbbd1931d0e19dbc7f"}, + {file = "pydantic_core-2.6.3-pp37-pypy37_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:692b4ff5c4e828a38716cfa92667661a39886e71136c97b7dac26edef18767f7"}, + {file = "pydantic_core-2.6.3-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:f1a5d8f18877474c80b7711d870db0eeef9442691fcdb00adabfc97e183ee0b0"}, + {file = "pydantic_core-2.6.3-pp38-pypy38_pp73-macosx_10_7_x86_64.whl", hash = "sha256:3796a6152c545339d3b1652183e786df648ecdf7c4f9347e1d30e6750907f5bb"}, + {file = "pydantic_core-2.6.3-pp38-pypy38_pp73-macosx_11_0_arm64.whl", hash = "sha256:b962700962f6e7a6bd77e5f37320cabac24b4c0f76afeac05e9f93cf0c620014"}, + {file = "pydantic_core-2.6.3-pp38-pypy38_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:56ea80269077003eaa59723bac1d8bacd2cd15ae30456f2890811efc1e3d4413"}, + {file = "pydantic_core-2.6.3-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:75c0ebbebae71ed1e385f7dfd9b74c1cff09fed24a6df43d326dd7f12339ec34"}, + {file = "pydantic_core-2.6.3-pp38-pypy38_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:252851b38bad3bfda47b104ffd077d4f9604a10cb06fe09d020016a25107bf98"}, + {file = "pydantic_core-2.6.3-pp38-pypy38_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:6656a0ae383d8cd7cc94e91de4e526407b3726049ce8d7939049cbfa426518c8"}, + {file = "pydantic_core-2.6.3-pp38-pypy38_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:d9140ded382a5b04a1c030b593ed9bf3088243a0a8b7fa9f071a5736498c5483"}, + {file = "pydantic_core-2.6.3-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:d38bbcef58220f9c81e42c255ef0bf99735d8f11edef69ab0b499da77105158a"}, + {file = "pydantic_core-2.6.3-pp39-pypy39_pp73-macosx_10_7_x86_64.whl", hash = "sha256:c9d469204abcca28926cbc28ce98f28e50e488767b084fb3fbdf21af11d3de26"}, + {file = "pydantic_core-2.6.3-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:48c1ed8b02ffea4d5c9c220eda27af02b8149fe58526359b3c07eb391cb353a2"}, + {file = "pydantic_core-2.6.3-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8b2b1bfed698fa410ab81982f681f5b1996d3d994ae8073286515ac4d165c2e7"}, + {file = "pydantic_core-2.6.3-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:bf9d42a71a4d7a7c1f14f629e5c30eac451a6fc81827d2beefd57d014c006c4a"}, + {file = "pydantic_core-2.6.3-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4292ca56751aebbe63a84bbfc3b5717abb09b14d4b4442cc43fd7c49a1529efd"}, + {file = "pydantic_core-2.6.3-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:7dc2ce039c7290b4ef64334ec7e6ca6494de6eecc81e21cb4f73b9b39991408c"}, + {file = "pydantic_core-2.6.3-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:615a31b1629e12445c0e9fc8339b41aaa6cc60bd53bf802d5fe3d2c0cda2ae8d"}, + {file = "pydantic_core-2.6.3-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:1fa1f6312fb84e8c281f32b39affe81984ccd484da6e9d65b3d18c202c666149"}, + {file = "pydantic_core-2.6.3.tar.gz", hash = "sha256:1508f37ba9e3ddc0189e6ff4e2228bd2d3c3a4641cbe8c07177162f76ed696c7"}, +] -[package.extras] -plugins = ["importlib-metadata"] +[package.dependencies] +typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" [[package]] -name = "pyparsing" -version = "3.0.7" -description = "Python parsing module" -category = "dev" +name = "pygments" +version = "2.16.1" +description = "Pygments is a syntax highlighting package written in Python." optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "Pygments-2.16.1-py3-none-any.whl", hash = "sha256:13fc09fa63bc8d8671a6d247e1eb303c4b343eaee81d861f3404db2935653692"}, + {file = "Pygments-2.16.1.tar.gz", hash = "sha256:1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29"}, +] [package.extras] -diagrams = ["jinja2", "railroad-diagrams"] +plugins = ["importlib-metadata"] [[package]] name = "pytz" -version = "2022.2.1" +version = "2023.3" description = "World timezone definitions, modern and historical" -category = "dev" optional = false python-versions = "*" +files = [ + {file = "pytz-2023.3-py2.py3-none-any.whl", hash = "sha256:a151b3abb88eda1d4e34a9814df37de2a80e301e68ba0fd856fb9b46bfbbbffb"}, + {file = "pytz-2023.3.tar.gz", hash = "sha256:1d8ce29db189191fb55338ee6d0387d82ab59f3d00eac103412d64e0ebd0c588"}, +] [[package]] name = "requests" -version = "2.27.1" +version = "2.31.0" description = "Python HTTP for Humans." -category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.7" +files = [ + {file = "requests-2.31.0-py3-none-any.whl", hash = "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f"}, + {file = "requests-2.31.0.tar.gz", hash = "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1"}, +] [package.dependencies] certifi = ">=2017.4.17" -charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} -idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} -urllib3 = ">=1.21.1,<1.27" +charset-normalizer = ">=2,<4" +idna = ">=2.5,<4" +urllib3 = ">=1.21.1,<3" [package.extras] -socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] -use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] +socks = ["PySocks (>=1.5.6,!=1.5.7)"] +use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] [[package]] name = "snowballstemmer" version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." -category = "dev" optional = false python-versions = "*" +files = [ + {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, + {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, +] [[package]] name = "sphinx" -version = "5.2.3" +version = "5.3.0" description = "Python documentation generator" -category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "Sphinx-5.3.0.tar.gz", hash = "sha256:51026de0a9ff9fc13c05d74913ad66047e104f56a129ff73e174eb5c3ee794b5"}, + {file = "sphinx-5.3.0-py3-none-any.whl", hash = "sha256:060ca5c9f7ba57a08a1219e547b269fadf125ae25b06b9fa7f66768efb652d6d"}, +] [package.dependencies] alabaster = ">=0.7,<0.8" @@ -227,171 +511,142 @@ sphinxcontrib-serializinghtml = ">=1.1.5" [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["flake8 (>=3.5.0)", "flake8-comprehensions", "flake8-bugbear", "flake8-simplify", "isort", "mypy (>=0.981)", "sphinx-lint", "docutils-stubs", "types-typed-ast", "types-requests"] -test = ["pytest (>=4.6)", "html5lib", "typed-ast", "cython"] +lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-bugbear", "flake8-comprehensions", "flake8-simplify", "isort", "mypy (>=0.981)", "sphinx-lint", "types-requests", "types-typed-ast"] +test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] [[package]] name = "sphinxcontrib-applehelp" version = "1.0.2" description = "sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books" -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-applehelp-1.0.2.tar.gz", hash = "sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58"}, + {file = "sphinxcontrib_applehelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a"}, +] [package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] -lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-devhelp" version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, + {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, +] [package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] -lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-htmlhelp" version = "2.0.0" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" -category = "dev" optional = false python-versions = ">=3.6" +files = [ + {file = "sphinxcontrib-htmlhelp-2.0.0.tar.gz", hash = "sha256:f5f8bb2d0d629f398bf47d0d69c07bc13b65f75a81ad9e2f71a63d4b7a2f6db2"}, + {file = "sphinxcontrib_htmlhelp-2.0.0-py2.py3-none-any.whl", hash = "sha256:d412243dfb797ae3ec2b59eca0e52dac12e75a241bf0e4eb861e450d06c6ed07"}, +] [package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["html5lib", "pytest"] -lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-jsmath" version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, + {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, +] [package.extras] -test = ["mypy", "flake8", "pytest"] +test = ["flake8", "mypy", "pytest"] [[package]] name = "sphinxcontrib-qthelp" version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, + {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, +] [package.extras] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] -lint = ["docutils-stubs", "mypy", "flake8"] [[package]] name = "sphinxcontrib-serializinghtml" version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." -category = "dev" optional = false python-versions = ">=3.5" +files = [ + {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, + {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, +] [package.extras] -lint = ["flake8", "mypy", "docutils-stubs"] +lint = ["docutils-stubs", "flake8", "mypy"] test = ["pytest"] [[package]] name = "typing-extensions" -version = "4.1.1" -description = "Backported and Experimental Type Hints for Python 3.6+" -category = "main" +version = "4.7.1" +description = "Backported and Experimental Type Hints for Python 3.7+" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "typing_extensions-4.7.1-py3-none-any.whl", hash = "sha256:440d5dd3af93b060174bf433bccd69b0babc3b15b1a8dca43789fd7f61514b36"}, + {file = "typing_extensions-4.7.1.tar.gz", hash = "sha256:b75ddc264f0ba5615db7ba217daeb99701ad295353c45f9e95963337ceeeffb2"}, +] [[package]] name = "urllib3" -version = "1.22" +version = "2.0.4" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.7" +files = [ + {file = "urllib3-2.0.4-py3-none-any.whl", hash = "sha256:de7df1803967d2c2a98e4b11bb7d6bd9210474c46e8a0401514e3a42a75ebde4"}, + {file = "urllib3-2.0.4.tar.gz", hash = "sha256:8d22f86aae8ef5e410d4f539fde9ce6b2113a001bb4d189e0aed70642d602b11"}, +] [package.extras] -secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] -socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17.1.0)", "urllib3-secure-extra"] +socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] +zstd = ["zstandard (>=0.18.0)"] [[package]] name = "zipp" -version = "3.6.0" +version = "3.15.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" +files = [ + {file = "zipp-3.15.0-py3-none-any.whl", hash = "sha256:48904fc76a60e542af151aded95726c1a5c34ed43ab4134b597665c86d7ad556"}, + {file = "zipp-3.15.0.tar.gz", hash = "sha256:112929ad649da941c23de50f356a2b5570c954b65150642bccdd66bf194d224b"}, +] [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["furo", "jaraco.packaging (>=9)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["big-O", "flake8 (<5)", "jaraco.functools", "jaraco.itertools", "more-itertools", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-flake8", "pytest-mypy (>=0.9.1)"] [metadata] -lock-version = "1.1" -python-versions = ">=3.6.1" -content-hash = "90e32adbb97a3e41a398b13e6e4c9123844c32ab94ab013f714e957cd4992dd8" - -[metadata.files] -alabaster = [] -babel = [] -certifi = [] -charset-normalizer = [ - {file = "charset-normalizer-2.0.12.tar.gz", hash = "sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597"}, - {file = "charset_normalizer-2.0.12-py3-none-any.whl", hash = "sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df"}, -] -colorama = [ - {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, - {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, -] -dataclasses = [ - {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, - {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, -] -docutils = [] -idna = [] -imagesize = [] -importlib-metadata = [ - {file = "importlib_metadata-4.8.3-py3-none-any.whl", hash = "sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e"}, - {file = "importlib_metadata-4.8.3.tar.gz", hash = "sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668"}, -] -jinja2 = [] -markupsafe = [] -packaging = [ - {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, - {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, -] -pydantic = [] -pygments = [] -pyparsing = [ - {file = "pyparsing-3.0.7-py3-none-any.whl", hash = "sha256:a6c06a88f252e6c322f65faf8f418b16213b51bdfaece0524c1c1bc30c63c484"}, - {file = "pyparsing-3.0.7.tar.gz", hash = "sha256:18ee9022775d270c55187733956460083db60b37d0d0fb357445f3094eed3eea"}, -] -pytz = [] -requests = [ - {file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"}, - {file = "requests-2.27.1.tar.gz", hash = "sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61"}, -] -snowballstemmer = [] -sphinx = [] -sphinxcontrib-applehelp = [] -sphinxcontrib-devhelp = [] -sphinxcontrib-htmlhelp = [] -sphinxcontrib-jsmath = [] -sphinxcontrib-qthelp = [] -sphinxcontrib-serializinghtml = [] -typing-extensions = [ - {file = "typing_extensions-4.1.1-py3-none-any.whl", hash = "sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2"}, - {file = "typing_extensions-4.1.1.tar.gz", hash = "sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42"}, -] -urllib3 = [] -zipp = [ - {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, - {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"}, -] +lock-version = "2.0" +python-versions = ">=3.7" +content-hash = "c26757f1b50674342d05c37118ac7f13c07626ed81b1b63e77585daeed09a375" diff --git a/pyproject.toml b/pyproject.toml index f941b2e..47c4e50 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,8 +30,8 @@ classifiers = [ ] [tool.poetry.dependencies] -python = ">=3.6.1" -pydantic = "^1.8.1" +python = ">=3.7" +pydantic = "^2.3.0" [tool.poetry.dev-dependencies] Sphinx = "^5.2.3" diff --git a/stellar_model/model/horizon/account.py b/stellar_model/model/horizon/account.py index b7136cf..2f6dacf 100644 --- a/stellar_model/model/horizon/account.py +++ b/stellar_model/model/horizon/account.py @@ -75,33 +75,40 @@ class Balance(BaseModel): ) liquidity_pool_id: Optional[str] = Field( description="This liquidity pool’s id encoded in a " - "hex string representation." + "hex string representation.", + default=None, ) limit: Optional[Decimal] = Field( description="The maximum amount of this asset that this account " - "is willing to accept. Specified when opening a trustline." + "is willing to accept. Specified when opening a trustline.", + default=None, ) buying_liabilities: Optional[Decimal] = Field( - description="The sum of all buy offers owned by this account " "for this asset." + description="The sum of all buy offers owned by this account for this asset.", + default=None, ) selling_liabilities: Optional[Decimal] = Field( description="The sum of all sell offers owned by this account " - "for this asset." + "for this asset.", + default=None, ) sponsor: Optional[str] = Field( description="The account ID of the sponsor who is paying " - "the reserves for this trustline." + "the reserves for this trustline.", + default=None, ) - last_modified_ledger: Optional[int] - is_authorized: Optional[bool] - is_authorized_to_maintain_liabilities: Optional[bool] - is_clawback_enabled: Optional[bool] + last_modified_ledger: Optional[int] = None + is_authorized: Optional[bool] = None + is_authorized_to_maintain_liabilities: Optional[bool] = None + is_clawback_enabled: Optional[bool] = None asset_type: str = Field( description="Either **native**, **credit_alphanum4**, or **credit_alphanum12**." ) - asset_code: Optional[str] = Field(description="The code for this asset.") + asset_code: Optional[str] = Field( + description="The code for this asset.", default=None + ) asset_issuer: Optional[str] = Field( - description="The Stellar address of this asset's issuer." + description="The Stellar address of this asset's issuer.", default=None ) @@ -129,24 +136,28 @@ class Account(BaseModel): "For use when submitting this account's next transaction." ) sequence_ledger: Optional[int] = Field( - description="The unsigned 32-bit ledger " "number of the sequence number's age." + description="The unsigned 32-bit ledger " + "number of the sequence number's age.", + default=None, ) sequence_time: Optional[datetime] = Field( - description="The time of the sequence number's age." + description="The time of the sequence number's age.", default=None ) subentry_count: int = Field(description="The number of subentries on this account.") inflation_destination: Optional[str] = Field( - description="The inflation destination set for this account." + description="The inflation destination set for this account.", default=None ) home_domain: Optional[str] = Field( - description="The domain that hosts this account's stellar.toml file." + description="The domain that hosts this account's stellar.toml file.", + default=None, ) last_modified_ledger: int = Field( description="The ID of the last ledger that included changes to this account." ) last_modified_time: Optional[datetime] = Field( description="The time of the last ledger that included " - "changes to this account." + "changes to this account.", + default=None, ) thresholds: AccountThresholds = Field( description="Operations have varying levels of access. " @@ -170,7 +181,8 @@ class Account(BaseModel): ) sponsor: Optional[str] = Field( description="The account ID of the sponsor who is paying the " - "reserves for this account." + "reserves for this account.", + default=None, ) paging_token: str = Field(description="A cursor value for use in pagination.") links: Links = Field(alias="_links") diff --git a/stellar_model/model/horizon/account_data.py b/stellar_model/model/horizon/account_data.py index 6a300a6..36ab081 100644 --- a/stellar_model/model/horizon/account_data.py +++ b/stellar_model/model/horizon/account_data.py @@ -14,4 +14,4 @@ class AccountData(BaseModel): value: str = Field(description="The key value for this data.") # TODO: add description - sponsor: Optional[str] + sponsor: Optional[str] = None diff --git a/stellar_model/model/horizon/asset.py b/stellar_model/model/horizon/asset.py index 548c248..64e386f 100644 --- a/stellar_model/model/horizon/asset.py +++ b/stellar_model/model/horizon/asset.py @@ -13,7 +13,9 @@ class Asset(BaseModel): description="The type for this asset. Either **native**, " "**credit_alphanum4**, or **credit_alphanum12**." ) - asset_code: Optional[str] = Field(description="The code for this asset.") + asset_code: Optional[str] = Field( + description="The code for this asset.", default=None + ) asset_issuer: Optional[str] = Field( - description="The Stellar address of this asset's issuer." + description="The Stellar address of this asset's issuer.", default=None ) diff --git a/stellar_model/model/horizon/claimable_balance.py b/stellar_model/model/horizon/claimable_balance.py index c90e3e1..c7eb251 100644 --- a/stellar_model/model/horizon/claimable_balance.py +++ b/stellar_model/model/horizon/claimable_balance.py @@ -26,7 +26,8 @@ class ClaimPredicate(BaseModel): # TODO: add type in the future. unconditional: Optional[bool] = Field( description="If **True** it means this clause of the condition " - "is always satisfied." + "is always satisfied.", + default=None, ) # https://pydantic-docs.helpmanual.io/usage/postponed_annotations/ and_predicates: Optional[List["ClaimPredicate"]] = Field( @@ -37,6 +38,7 @@ class ClaimPredicate(BaseModel): "condition is satisfied if both " "of the two elements in the array " "are satisfied.", + default=None, ) or_predicates: Optional[List["ClaimPredicate"]] = Field( alias="or", @@ -46,26 +48,31 @@ class ClaimPredicate(BaseModel): "condition is satisfied if at " "least one of the two elements " "in the array are satisfied.", + default=None, ) not_predicate: Optional["ClaimPredicate"] = Field( alias="not", description="The value is also a predicate. This " "clause of the condition is satisfied " "if the value is not satisfied.", + default=None, ) abs_before: Optional[datetime] = Field( description="The datetime representing a deadline for when the claimable " "balance can be claimed. If the balance is claimed before the " - "date then this clause of the condition is satisfied." + "date then this clause of the condition is satisfied.", + default=None, ) abs_before_epoch: Optional[int] = Field( - "The Unix Epoch value represented by the same custom extended " - "ISO date value in the abs_before field." + description="The Unix Epoch value represented by the same custom extended " + "ISO date value in the abs_before field.", + default=None, ) rel_before: Optional[int] = Field( description="A relative deadline for when the claimable balance can be " "claimed. The value represents the number of seconds since the " - "close time of the ledger which created the claimable balance." + "close time of the ledger which created the claimable balance.", + default=None, ) @@ -100,13 +107,14 @@ class ClaimableBalance(BaseModel): ) amount: Decimal = Field(description="The amount of **asset** that can be claimed.") sponsor: Optional[str] = Field( - description="The account id of the sponsor who is paying the reserves for this claimable balance." + description="The account id of the sponsor who is paying the reserves for this claimable balance.", + default=None, ) last_modified_ledger: int = Field( description="The sequence number of the last ledger in which this claimable balance was modified." ) last_modified_time: Optional[datetime] = Field( - description="The datetime of last modification time." + description="The datetime of last modification time.", default=None ) claimants: List[Claimant] = Field( description="The list of entries which could claim the claimable balance." diff --git a/stellar_model/model/horizon/effects.py b/stellar_model/model/horizon/effects.py index 1353191..544adf3 100644 --- a/stellar_model/model/horizon/effects.py +++ b/stellar_model/model/horizon/effects.py @@ -84,8 +84,8 @@ class BaseEffect(BaseModel): id: str paging_token: str account: str - account_muxed: Optional[str] - account_muxed_id: Optional[int] + account_muxed: Optional[str] = None + account_muxed_id: Optional[int] = None type: str type_i: int # The maximum year in Python is 9999 @@ -123,8 +123,8 @@ class AccountCreditedEffect(BaseEffect): """ asset_type: str - asset_code: Optional[str] - asset_issuer: Optional[str] + asset_code: Optional[str] = None + asset_issuer: Optional[str] = None amount: Decimal @@ -137,8 +137,8 @@ class AccountDebitedEffect(BaseEffect): """ asset_type: str - asset_code: Optional[str] - asset_issuer: Optional[str] + asset_code: Optional[str] = None + asset_issuer: Optional[str] = None amount: Decimal @@ -175,8 +175,8 @@ class AccountFlagsUpdatedEffect(BaseEffect): type_i: 6 """ - auth_required_flag: Optional[bool] - auth_revokable_flag: Optional[bool] + auth_required_flag: Optional[bool] = None + auth_revokable_flag: Optional[bool] = None class AccountInflationDestinationUpdatedEffect(BaseEffect): @@ -238,9 +238,9 @@ class TrustlineCreatedEffect(BaseEffect): """ asset_type: str - asset_code: Optional[str] - asset_issuer: Optional[str] - liquidity_pool_id: Optional[str] + asset_code: Optional[str] = None + asset_issuer: Optional[str] = None + liquidity_pool_id: Optional[str] = None limit: Decimal @@ -253,9 +253,9 @@ class TrustlineRemovedEffect(BaseEffect): """ asset_type: str - asset_code: Optional[str] - asset_issuer: Optional[str] - liquidity_pool_id: Optional[str] + asset_code: Optional[str] = None + asset_issuer: Optional[str] = None + liquidity_pool_id: Optional[str] = None limit: Decimal @@ -268,9 +268,9 @@ class TrustlineUpdatedEffect(BaseEffect): """ asset_type: str - asset_code: Optional[str] - asset_issuer: Optional[str] - liquidity_pool_id: Optional[str] + asset_code: Optional[str] = None + asset_issuer: Optional[str] = None + liquidity_pool_id: Optional[str] = None limit: Decimal @@ -327,9 +327,9 @@ class TrustlineFlagsUpdatedEffect(BaseEffect): asset_code: str asset_issuer: str trustor: str - authorized_flag: Optional[bool] - authorized_to_maintain_liabilites_flag: Optional[bool] - clawback_enabled_flag: Optional[bool] + authorized_flag: Optional[bool] = None + authorized_to_maintain_liabilites_flag: Optional[bool] = None + clawback_enabled_flag: Optional[bool] = None class OfferCreatedEffect(BaseEffect): @@ -368,17 +368,17 @@ class TradeEffect(BaseEffect): """ seller: str - seller_muxed: Optional[str] - seller_muxed_id: Optional[int] + seller_muxed: Optional[str] = None + seller_muxed_id: Optional[int] = None offer_id: str sold_amount: Decimal sold_asset_type: str - sold_asset_code: Optional[str] - sold_asset_issuer: Optional[str] + sold_asset_code: Optional[str] = None + sold_asset_issuer: Optional[str] = None bought_amount: Decimal bought_asset_type: str - bought_asset_code: Optional[str] - bought_asset_issuer: Optional[str] + bought_asset_code: Optional[str] = None + bought_asset_issuer: Optional[str] = None class DataCreatedEffect(BaseEffect): @@ -510,8 +510,8 @@ class TrustlineSponsorshipCreatedEffect(BaseEffect): """ asset_type: str - asset: Optional[str] - liquidity_pool_id: Optional[str] + asset: Optional[str] = None + liquidity_pool_id: Optional[str] = None sponsor: str @@ -524,8 +524,8 @@ class TrustlineSponsorshipUpdatedEffect(BaseEffect): """ asset_type: str - asset: Optional[str] - liquidity_pool_id: Optional[str] + asset: Optional[str] = None + liquidity_pool_id: Optional[str] = None former_sponsor: str new_sponsor: str @@ -539,8 +539,8 @@ class TrustlineSponsorshipRemovedEffect(BaseEffect): """ asset_type: str - asset: Optional[str] - liquidity_pool_id: Optional[str] + asset: Optional[str] = None + liquidity_pool_id: Optional[str] = None former_sponsor: str diff --git a/stellar_model/model/horizon/ledger.py b/stellar_model/model/horizon/ledger.py index fa61142..4c4ad4a 100644 --- a/stellar_model/model/horizon/ledger.py +++ b/stellar_model/model/horizon/ledger.py @@ -30,7 +30,8 @@ class Ledger(BaseModel): description="A hex-encoded SHA-256 hash of this ledger's XDR-encoded form." ) prev_hash: Optional[str] = Field( - description="The hash of the ledger immediately preceding this ledger." + description="The hash of the ledger immediately preceding this ledger.", + default=None, ) sequence: int = Field( description="The sequence number of this ledger, and the parameter used in Horizon " diff --git a/stellar_model/model/horizon/link.py b/stellar_model/model/horizon/link.py index c737a68..37c3e7d 100644 --- a/stellar_model/model/horizon/link.py +++ b/stellar_model/model/horizon/link.py @@ -5,4 +5,4 @@ class Link(BaseModel): href: str - templated: Optional[bool] + templated: Optional[bool] = None diff --git a/stellar_model/model/horizon/liquidity_pool.py b/stellar_model/model/horizon/liquidity_pool.py index 11d5470..79d733c 100644 --- a/stellar_model/model/horizon/liquidity_pool.py +++ b/stellar_model/model/horizon/liquidity_pool.py @@ -41,6 +41,7 @@ class LiquidityPool(BaseModel): "in which this offer was modified." ) last_modified_time: Optional[datetime] = Field( - description="The time of the last ledger " "in which this offer was modified." + description="The time of the last ledger " "in which this offer was modified.", + default=None, ) links: Links = Field(alias="_links") diff --git a/stellar_model/model/horizon/offer.py b/stellar_model/model/horizon/offer.py index cbfaccc..4d30fe7 100644 --- a/stellar_model/model/horizon/offer.py +++ b/stellar_model/model/horizon/offer.py @@ -44,10 +44,12 @@ class Offer(BaseModel): "in which this offer was modified." ) last_modified_time: Optional[datetime] = Field( - description="The time of the last ledger " "in which this offer was modified." + description="The time of the last ledger " "in which this offer was modified.", + default=None, ) sponsor: Optional[str] = Field( description="The account id of the sponsor " - "who is paying the reserves for this offer." + "who is paying the reserves for this offer.", + default=None, ) links: Links = Field(alias="_links") diff --git a/stellar_model/model/horizon/operations.py b/stellar_model/model/horizon/operations.py index 669a40e..59f5ea1 100644 --- a/stellar_model/model/horizon/operations.py +++ b/stellar_model/model/horizon/operations.py @@ -66,16 +66,16 @@ class BaseOperation(BaseModel): source_account: str = Field( description="The account that originates the operation." ) - source_account_muxed: Optional[str] - source_account_muxed_id: Optional[int] + source_account_muxed: Optional[str] = None + source_account_muxed_id: Optional[int] = None type: str = Field(description="The name of the operation type.") type_i: int = Field(description="A number indicating the operation type.") created_at: datetime = Field(description="The datetime this operation was created.") transaction_hash: str = Field( description="A unique identifier for the transaction this operation belongs to." ) - transaction: Optional[Transaction] - sponsor: Optional[str] + transaction: Optional[Transaction] = None + sponsor: Optional[str] = None links: Links = Field(alias="_links") @@ -98,19 +98,23 @@ class BaseOfferOperation(BaseOperation): description="The type for the buying asset. Either **native**, **credit_alphanum4**, or **credit_alphanum12**." ) buying_asset_code: Optional[str] = Field( - description="The Stellar address of the buying asset’s issuer. Appears if the **buying_asset_type** is not **native**." + description="The Stellar address of the buying asset’s issuer. Appears if the **buying_asset_type** is not **native**.", + default=None, ) buying_asset_issuer: Optional[str] = Field( - description="The code for the buying asset. Appears if the **buying_asset_type** is not **native**." + description="The code for the buying asset. Appears if the **buying_asset_type** is not **native**.", + default=None, ) selling_asset_type: str = Field( description="The type for the selling asset. Either **native**, **credit_alphanum4**, or **credit_alphanum12**." ) selling_asset_code: Optional[str] = Field( - description="The Stellar address of the selling asset’s issuer. Appears if the **selling_asset_type** is not **native**." + description="The Stellar address of the selling asset’s issuer. Appears if the **selling_asset_type** is not **native**.", + default=None, ) selling_asset_issuer: Optional[str] = Field( - description="The code for the selling asset. Appears if the **selling_asset_type** is not **native**." + description="The code for the selling asset. Appears if the **selling_asset_type** is not **native**.", + default=None, ) @@ -126,8 +130,8 @@ class CreateAccountOperation(BaseOperation): description="The amount of XLM to send the newly created account." ) funder: str = Field(description="The account that funds the new account.") - funder_muxed: Optional[str] - funder_muxed_id: Optional[int] + funder_muxed: Optional[str] = None + funder_muxed_id: Optional[int] = None account: str = Field(description="A new account that is funded.") @@ -143,22 +147,24 @@ class PaymentOperation(BaseOperation): description="The type of asset being sent. Either **native**, **credit_alphanum4**, or **credit_alphanum12**." ) asset_code: Optional[str] = Field( - description="The code for the asset being sent. Appears if the **asset_type** is not **native**." + description="The code for the asset being sent. Appears if the **asset_type** is not **native**.", + default=None, ) asset_issuer: Optional[str] = Field( description="The Stellar address of the issuer of the asset being sent. " - "Appears if the **asset_type** is not **native**." + "Appears if the **asset_type** is not **native**.", + default=None, ) from_: str = Field( alias="from", description="The payment sender’s public key. This variable should be called `from`, " "but `from` is a keyword in Python, so we named it `from_`.", ) - from_muxed: Optional[str] - from_muxed_id: Optional[int] + from_muxed: Optional[str] = None + from_muxed_id: Optional[int] = None to: str = Field(description="The payment recipient’s public key.") - to_muxed: Optional[str] - to_muxed_id: Optional[int] + to_muxed: Optional[str] = None + to_muxed_id: Optional[int] = None amount: Decimal = Field(description="Amount sent.") @@ -176,11 +182,13 @@ class PathPaymentStrictReceiveOperation(BaseOperation): ) asset_code: Optional[str] = Field( description="The code for the asset being received. Appears if the " - "**asset_type** is not **native**." + "**asset_type** is not **native**.", + default=None, ) asset_issuer: Optional[str] = Field( description="The Stellar address of the issuer of the asset being " - "received. Appears if the **asset_type** is not **native**." + "received. Appears if the **asset_type** is not **native**.", + default=None, ) from_: str = Field( alias="from", @@ -207,11 +215,13 @@ class PathPaymentStrictReceiveOperation(BaseOperation): ) source_asset_code: Optional[str] = Field( description="The code for the source asset. Appears if the " - "**source_asset_type** is not **native**." + "**source_asset_type** is not **native**.", + default=None, ) source_asset_issuer: Optional[str] = Field( description="The Stellar address of the source asset’s issuer. " - "Appears if the **source_asset_type** is not **native**." + "Appears if the **source_asset_type** is not **native**.", + default=None, ) @@ -244,47 +254,56 @@ class SetOptionsOperation(BaseOperation): """ home_domain: Optional[str] = Field( - description="The home domain used for stellar.toml file discovery." + description="The home domain used for stellar.toml file discovery.", + default=None, ) - inflation_dest: Optional[str] = Field(description="") + inflation_dest: Optional[str] = Field(description="", default=None) master_key_weight: Optional[int] = Field( - description="The weight of the master key. Can range from **1** to **255**." + description="The weight of the master key. Can range from **1** to **255**.", + default=None, + ) + signer_key: Optional[str] = Field( + description="The public key of the new signer. ", default=None ) - signer_key: Optional[str] = Field(description="The public key of the new signer. ") signer_weight: Optional[int] = Field( - description="The weight of the new signer. Can range from **1** to **255**." + description="The weight of the new signer. Can range from **1** to **255**.", + default=None, ) set_flags: Optional[List[int]] = Field( description="The array of numeric values of flags that has been set in " "this operation. Options include **1** for **AUTH_REQUIRED_FLAG**, " - "**2** for **AUTH_REVOCABLE_FLAG**, and **4** for **AUTH_IMMUTABLE_FLAG**." + "**2** for **AUTH_REVOCABLE_FLAG**, and **4** for **AUTH_IMMUTABLE_FLAG**.", + default=None, ) set_flags_s: Optional[List[str]] = Field( description="The array of string values of flags that has been set in this operation. " "Options include **AUTH_REQUIRED_FLAG**, **AUTH_REVOCABLE_FLAG**, " - "and **AUTH_IMMUTABLE_FLAG**." + "and **AUTH_IMMUTABLE_FLAG**.", + default=None, ) clear_flags: Optional[List[int]] = Field( description="The array of numeric values of flags that has been cleared in this operation. " "Options include **1** for **AUTH_REQUIRED_FLAG**, **2** for " - "**AUTH_REVOCABLE_FLAG**, and **4** for **AUTH_IMMUTABLE_FLAG**." + "**AUTH_REVOCABLE_FLAG**, and **4** for **AUTH_IMMUTABLE_FLAG**.", + default=None, ) clear_flags_s: Optional[List[str]] = Field( description="The array of string values of flags that has been cleared in this " "operation. Options include **AUTH_REQUIRED_FLAG**, **AUTH_REVOCABLE_FLAG**, " - "and **AUTH_IMMUTABLE_FLAG**." + "and **AUTH_IMMUTABLE_FLAG**.", + default=None, ) low_threshold: Optional[int] = Field( - description="The sum weight for the low threshold." + description="The sum weight for the low threshold.", default=None ) med_threshold: Optional[int] = Field( - description="The sum weight for the medium threshold." + description="The sum weight for the medium threshold.", default=None ) high_threshold: Optional[int] = Field( - description="The sum weight for the high threshold." + description="The sum weight for the high threshold.", default=None ) @@ -301,21 +320,21 @@ class ChangeTrustOperation(BaseOperation): "**credit_alphanum4**, or **credit_alphanum12**." ) asset_code: Optional[str] = Field( - description="The code of the asset being trusted." + description="The code of the asset being trusted.", default=None ) asset_issuer: Optional[str] = Field( - description="The issuer for the asset being trusted." + description="The issuer for the asset being trusted.", default=None ) liquidity_pool_id: Optional[str] = Field( - description="The id of the liquidity pool being trusted." + description="The id of the liquidity pool being trusted.", default=None ) limit: Decimal = Field( description="Limits the amount of an asset that the source account can hold." ) - trustee: Optional[str] = Field(description="The issuing account.") + trustee: Optional[str] = Field(description="The issuing account.", default=None) trustor: str = Field(description="The source account.") - trustor_muxed: Optional[str] - trustor_muxed_id: Optional[int] + trustor_muxed: Optional[str] = None + trustor_muxed_id: Optional[int] = None class AllowTrustOperation(BaseOperation): @@ -330,18 +349,20 @@ class AllowTrustOperation(BaseOperation): description="The type of asset. Either **native**, **credit_alphanum4**, or **credit_alphanum12**." ) asset_code: Optional[str] = Field( - description="The code for the asset. Appears if the **asset_type** is not **native**." + description="The code for the asset. Appears if the **asset_type** is not **native**.", + default=None, ) asset_issuer: Optional[str] = Field( description="The Stellar address of the issuer of the asset. " - "Appears if the **asset_type** is not **native**." + "Appears if the **asset_type** is not **native**.", + default=None, ) trustee: str = Field( description="The issuing account, or source account in this instance." ) - trustee_muxed: Optional[str] - trustee_muxed_id: Optional[int] + trustee_muxed: Optional[str] = None + trustee_muxed_id: Optional[int] = None trustor: str = Field( description="The trusting account, or the account being authorized or unauthorized." ) @@ -364,13 +385,13 @@ class AccountMergeOperation(BaseOperation): """ account: str = Field(description="The Stellar address being removed.") - account_muxed: Optional[str] - account_muxed_id: Optional[int] + account_muxed: Optional[str] = None + account_muxed_id: Optional[int] = None into: str = Field( description="The Stellar address receiving the deleted account’s lumens." ) - into_muxed: Optional[str] - into_muxed_id: Optional[int] + into_muxed: Optional[str] = None + into_muxed_id: Optional[int] = None class InflationOperation(BaseOperation): @@ -440,11 +461,13 @@ class PathPaymentStrictSendOperation(BaseOperation): ) asset_code: Optional[str] = Field( description="The code for the asset being send. Appears if the " - "**asset_type** is not **native**." + "**asset_type** is not **native**.", + default=None, ) asset_issuer: Optional[str] = Field( description="The Stellar address of the issuer of the asset being " - "send. Appears if the **asset_type** is not **native**." + "send. Appears if the **asset_type** is not **native**.", + default=None, ) from_: str = Field( alias="from", @@ -470,11 +493,13 @@ class PathPaymentStrictSendOperation(BaseOperation): ) source_asset_code: Optional[str] = Field( description="The code for the source asset. Appears if the **asset_type** " - "is not **native**." + "is not **native**.", + default=None, ) source_asset_issuer: Optional[str] = Field( description="The Stellar address of the source asset’s issuer. " - "Appears if the **asset_type** is not **native**." + "Appears if the **asset_type** is not **native**.", + default=None, ) @@ -507,8 +532,8 @@ class ClaimClaimableBalanceOperation(BaseOperation): claimant: str = Field( description="The id of the account which claimed the balance." ) - claimant_muxed: Optional[str] - claimant_muxed_id: Optional[int] + claimant_muxed: Optional[str] = None + claimant_muxed_id: Optional[int] = None class BeginSponsoringFutureReservesOperation(BaseOperation): @@ -533,10 +558,11 @@ class EndSponsoringFutureReservesOperation(BaseOperation): """ begin_sponsor: Optional[str] = Field( - description="The id of the account which initiated the sponsorship." + description="The id of the account which initiated the sponsorship.", + default=None, ) - begin_sponsor_muxed: Optional[str] - begin_sponsor_muxed_id: Optional[int] + begin_sponsor_muxed: Optional[str] = None + begin_sponsor_muxed_id: Optional[int] = None class RevokeSponsorshipOperation(BaseOperation): @@ -548,34 +574,41 @@ class RevokeSponsorshipOperation(BaseOperation): """ account_id: Optional[str] = Field( - description="The id of the account which is no longer sponsored." + description="The id of the account which is no longer sponsored.", default=None ) claimable_balance_id: Optional[str] = Field( - description="The id of the claimable balance which is no longer sponsored." + description="The id of the claimable balance which is no longer sponsored.", + default=None, ) data_account_id: Optional[str] = Field( - description="The id of the account whose data entry is no longer sponsored." + description="The id of the account whose data entry is no longer sponsored.", + default=None, ) data_name: Optional[str] = Field( - description="The name of the data entry which is no longer sponsored." + description="The name of the data entry which is no longer sponsored.", + default=None, ) offer_id: Optional[str] = Field( - description="The id of the offer which is no longer sponsored." + description="The id of the offer which is no longer sponsored.", default=None ) trustline_account_id: Optional[str] = Field( - description="The id of the account whose trustline is no longer sponsored." + description="The id of the account whose trustline is no longer sponsored.", + default=None, ) trustline_liquidity_pool_id: Optional[str] = Field( - default="The liquidity pool of the trustline which is no longer sponsored." + description="The liquidity pool of the trustline which is no longer sponsored.", + default=None, ) trustline_asset: Optional[str] = Field( - description="The asset of the trustline which is no longer sponsored." + description="The asset of the trustline which is no longer sponsored.", + default=None, ) signer_account_id: Optional[str] = Field( - description="The account id of the signer which is no longer sponsored." + description="The account id of the signer which is no longer sponsored.", + default=None, ) signer_key: Optional[str] = Field( - description="The type of the signer which is no longer sponsored." + description="The type of the signer which is no longer sponsored.", default=None ) @@ -595,8 +628,8 @@ class ClawbackOperation(BaseOperation): description="This variable should be called `from`, " "but `from` is a keyword in Python, so we named it `from_`.", ) - from_muxed: Optional[str] - from_muxed_id: Optional[int] + from_muxed: Optional[str] = None + from_muxed_id: Optional[int] = None amount: Decimal @@ -608,7 +641,7 @@ class ClawbackClaimableBalanceOperation(BaseOperation): type_i: 20 """ - balance_id: Optional[str] + balance_id: Optional[str] = None class SetTrustLineFlagsOperation(BaseOperation): @@ -623,10 +656,10 @@ class SetTrustLineFlagsOperation(BaseOperation): asset_code: str asset_issuer: str trustor: str - set_flags: Optional[List[int]] - set_flags_s: Optional[List[str]] - clear_flags: Optional[List[int]] - clear_flags_s: Optional[List[str]] + set_flags: Optional[List[int]] = None + set_flags_s: Optional[List[str]] = None + clear_flags: Optional[List[int]] = None + clear_flags_s: Optional[List[str]] = None class LiquidityPoolDepositOperation(BaseOperation): diff --git a/stellar_model/model/horizon/path.py b/stellar_model/model/horizon/path.py index 149fc98..dbd2bb0 100644 --- a/stellar_model/model/horizon/path.py +++ b/stellar_model/model/horizon/path.py @@ -21,10 +21,10 @@ class Path(BaseModel): "**credit_alphanum4**, or **credit_alphanum12**." ) source_asset_code: Optional[str] = Field( - description="The code for the source asset." + description="The code for the source asset.", default=None ) source_asset_issuer: Optional[str] = Field( - description="The Stellar address of the source asset's issuer." + description="The Stellar address of the source asset's issuer.", default=None ) source_amount: Decimal = Field( description="An estimated cost for making a payment of destination_amount on " @@ -36,10 +36,11 @@ class Path(BaseModel): "**credit_alphanum4**, or **credit_alphanum12**." ) destination_asset_code: Optional[str] = Field( - description="The code for the destination asset." + description="The code for the destination asset.", default=None ) destination_asset_issuer: Optional[str] = Field( - description="The Stellar address of the destination asset's issuer." + description="The Stellar address of the destination asset's issuer.", + default=None, ) destination_amount: Decimal = Field( description="The destination amount specified in the s" diff --git a/stellar_model/model/horizon/root.py b/stellar_model/model/horizon/root.py index 3548f1b..cb74540 100644 --- a/stellar_model/model/horizon/root.py +++ b/stellar_model/model/horizon/root.py @@ -18,7 +18,7 @@ class Links(BaseModel): assets: Link effects: Link fee_stats: Link - friendbot: Optional[Link] + friendbot: Optional[Link] = None ledger: Link ledgers: Link offer: Link diff --git a/stellar_model/model/horizon/trade.py b/stellar_model/model/horizon/trade.py index 39be3e7..b7cf4c3 100644 --- a/stellar_model/model/horizon/trade.py +++ b/stellar_model/model/horizon/trade.py @@ -29,23 +29,27 @@ class Trade(BaseModel): ledger_close_time: datetime = Field( description="The datetime of when the ledger with this trade was closed." ) - offer_id: Optional[str] = Field(description="The sell offer ID. **DECPRECATED**") + offer_id: Optional[str] = Field( + description="The sell offer ID. **DECPRECATED**", default=None + ) trade_type: str = Field( - default="Can be set to **all**, **orderbook**, " + description="Can be set to **all**, **orderbook**, " "or **liquidity_pools** to filter only " "trades executed across a given mechanism." ) - liquidity_pool_fee_bp: Optional[int] + liquidity_pool_fee_bp: Optional[int] = None base_liquidity_pool_id: Optional[str] = Field( description="The base liquidity pool ID. If this trade " - "was executed against a liquidity pool." + "was executed against a liquidity pool.", + default=None, ) base_offer_id: Optional[str] = Field( description="The base offer ID. If this offer was immediately and " - "fully consumed, this will be a synethic ID." + "fully consumed, this will be a synethic ID.", + default=None, ) base_account: Optional[str] = Field( - description="The account ID of the base party for this trade." + description="The account ID of the base party for this trade.", default=None ) base_amount: Decimal = Field( description="The amount of the base asset that was moved " @@ -55,21 +59,25 @@ class Trade(BaseModel): description="The type for the base asset. Either **native**, " "**credit_alphanum4**, or **credit_alphanum12**." ) - base_asset_code: Optional[str] = Field(description="The code for the base asset.") + base_asset_code: Optional[str] = Field( + description="The code for the base asset.", default=None + ) base_asset_issuer: Optional[str] = Field( - description="The Stellar address of the base asset's issuer." + description="The Stellar address of the base asset's issuer.", default=None ) counter_liquidity_pool_id: Optional[str] = Field( description="The counter liquidity pool ID. " - "If this trade was executed against a liquidity pool." + "If this trade was executed against a liquidity pool.", + default=None, ) counter_offer_id: Optional[str] = Field( description="The counter offer ID. If this offer was " "immediately and fully consumed, this will " - "be a synethic ID." + "be a synethic ID.", + default=None, ) counter_account: Optional[str] = Field( - description="The account ID of the counter party for this trade." + description="The account ID of the counter party for this trade.", default=None ) counter_amount: Decimal = Field( description="The amount of the counter asset that was " @@ -80,15 +88,16 @@ class Trade(BaseModel): "Either **native**, **credit_alphanum4**, or **credit_alphanum12**." ) counter_asset_code: Optional[str] = Field( - description="The code for the counter asset." + description="The code for the counter asset.", default=None ) counter_asset_issuer: Optional[str] = Field( - description="The Stellar address of the counter asset's issuer." + description="The Stellar address of the counter asset's issuer.", default=None ) base_is_seller: bool = Field(description="Indicates with party is the seller.") price: Optional[Price] = Field( description="An object of a number numerator and number denominator that represents " "the original offer price. To derive the price, " - "divide **n** by **d**." + "divide **n** by **d**.", + default=None, ) links: Links = Field(alias="_links") diff --git a/stellar_model/model/horizon/transaction.py b/stellar_model/model/horizon/transaction.py index 8e96a32..5c345d5 100644 --- a/stellar_model/model/horizon/transaction.py +++ b/stellar_model/model/horizon/transaction.py @@ -45,8 +45,8 @@ class InnerTransaction(BaseModel): class TimeBounds(BaseModel): - min_time: Optional[datetime] = Field(description="The lower bound.") - max_time: Optional[datetime] = Field(description="The upper bound.") + min_time: Optional[datetime] = Field(description="The lower bound.", default=None) + max_time: Optional[datetime] = Field(description="The upper bound.", default=None) class LedgerBounds(BaseModel): @@ -57,29 +57,35 @@ class LedgerBounds(BaseModel): class TransactionPreconditions(BaseModel): timebounds: Optional[TimeBounds] = Field( description="The time range for which this transaction is valid, " - "with bounds as unsigned 64-bit UNIX timestamps." + "with bounds as unsigned 64-bit UNIX timestamps.", + default=None, ) ledgerbounds: Optional[LedgerBounds] = Field( - description="The ledger range for which this transaction is valid, as unsigned 32-bit integers." + description="The ledger range for which this transaction is valid, as unsigned 32-bit integers.", + default=None, ) min_account_sequence: Optional[int] = Field( description="Containing a positive, signed 64-bit " "integer representing the lowest source account " - "sequence number for which the transaction is valid." + "sequence number for which the transaction is valid.", + default=None, ) min_account_sequence_age: Optional[int] = Field( description="The minimum duration of time (in seconds as an unsigned 64-bit " "integer) that must have passed since the source account's sequence " - "number changed for the transaction to be valid." + "number changed for the transaction to be valid.", + default=None, ) min_account_sequence_ledger_gap: Optional[int] = Field( description="An unsigned 32-bit integer representing the minimum number of " "ledgers that must have closed since the source account's " - "sequence number changed for the transaction to be valid." + "sequence number changed for the transaction to be valid.", + default=None, ) extra_signers: Optional[List[str]] = Field( description="The list of up to two additional signers that must " - "have corresponding signatures for this transaction to be valid." + "have corresponding signatures for this transaction to be valid.", + default=None, ) @@ -106,10 +112,10 @@ class Transaction(BaseModel): description="The account that originates the transaction." ) account_muxed: Optional[str] = Field( - description="account_muxed for source_account." + description="account_muxed for source_account.", default=None ) account_muxed_id: Optional[int] = Field( - description="account_muxed_id for source_account." + description="account_muxed_id for source_account.", default=None ) source_account_sequence: int = Field( description="The source account's sequence number that " @@ -117,10 +123,10 @@ class Transaction(BaseModel): ) fee_account: str = Field(description="Account for paying transaction fees.") fee_account_muxed: Optional[str] = Field( - description="account_muxed for fee_account." + description="account_muxed for fee_account.", default=None ) fee_account_muxed_id: Optional[int] = Field( - description="account_muxed_id for fee_account." + description="account_muxed_id for fee_account.", default=None ) fee_charged: int = Field( description="The fee (in stroops) paid by the fee account to " @@ -153,25 +159,28 @@ class Transaction(BaseModel): "**MEMO_ID**, **MEMO_HASH**, **MEMO_RETURN**." ) memo: Optional[str] = Field( - description="The optional memo attached to a transaction." + description="The optional memo attached to a transaction.", default=None ) - memo_bytes: Optional[bytes] + memo_bytes: Optional[bytes] = None signatures: List[str] = Field( description="An array of signatures used to sign this transaction." ) valid_after: Optional[datetime] = Field( description="The datetime after which a transaction is valid. This field is deprecated in lieu " - "of `preconditions.time_bounds.min_time` and will be removed in Horizon v3." + "of `preconditions.time_bounds.min_time` and will be removed in Horizon v3.", + default=None, ) valid_before: Optional[datetime] = Field( description="The datetime before which a transaction is valid. This field is deprecated in lieu " - "of `preconditions.time_bounds.max_time` and will be removed in Horizon v3." + "of `preconditions.time_bounds.max_time` and will be removed in Horizon v3.", + default=None, ) preconditions: Optional[TransactionPreconditions] = Field( - description="A set of transaction preconditions affecting its validity." + description="A set of transaction preconditions affecting its validity.", + default=None, ) - fee_bump_transaction: Optional[FeeBumpTransaction] - inner_transaction: Optional[InnerTransaction] + fee_bump_transaction: Optional[FeeBumpTransaction] = None + inner_transaction: Optional[InnerTransaction] = None links: Links = Field(alias="_links") def __init__(self, **data): diff --git a/stellar_model/response/effect_response.py b/stellar_model/response/effect_response.py index a570868..31c88c2 100644 --- a/stellar_model/response/effect_response.py +++ b/stellar_model/response/effect_response.py @@ -38,5 +38,5 @@ def __init__(self, **data): f"Please try to upgrade the library or raise an issue at {__issues__}." ) parser = _EFFECT_TYPE_I_MAP[effect_type] - record = parser.parse_obj(data) + record = parser.model_validate(data) super().__init__(record=record) diff --git a/stellar_model/response/effects_response.py b/stellar_model/response/effects_response.py index fe95674..f10b77e 100644 --- a/stellar_model/response/effects_response.py +++ b/stellar_model/response/effects_response.py @@ -31,7 +31,7 @@ def __init__(self, records): f"Please try to upgrade the library or raise an issue at {__issues__}." ) parser = _EFFECT_TYPE_I_MAP[effect_type] - model = parser.parse_obj(record) + model = parser.model_validate(record) model_records.append(model) super().__init__(records=model_records) diff --git a/stellar_model/response/error_response.py b/stellar_model/response/error_response.py index 814983d..e91bb2d 100644 --- a/stellar_model/response/error_response.py +++ b/stellar_model/response/error_response.py @@ -18,5 +18,5 @@ class ErrorResponse(BaseModel): type: str title: str status: int - detail: Optional[str] - extras: Optional[Mapping[str, Any]] + detail: Optional[str] = None + extras: Optional[Mapping[str, Any]] = None diff --git a/stellar_model/response/operation_response.py b/stellar_model/response/operation_response.py index 05a7670..6645654 100644 --- a/stellar_model/response/operation_response.py +++ b/stellar_model/response/operation_response.py @@ -36,5 +36,5 @@ def __init__(self, **data): f"Please try to upgrade the library or raise an issue at {__issues__}." ) parser = _OPERATION_TYPE_I_MAP[op_type] - record = parser.parse_obj(data) + record = parser.model_validate(data) super().__init__(record=record) diff --git a/stellar_model/response/operations_response.py b/stellar_model/response/operations_response.py index 086768a..0ff491f 100644 --- a/stellar_model/response/operations_response.py +++ b/stellar_model/response/operations_response.py @@ -31,7 +31,7 @@ def __init__(self, records): f"Please try to upgrade the library or raise an issue at {__issues__}." ) parser = _OPERATION_TYPE_I_MAP[op_type] - model = parser.parse_obj(record) + model = parser.model_validate(record) model_records.append(model) super().__init__(records=model_records) diff --git a/stellar_model/response/payments_response.py b/stellar_model/response/payments_response.py index 7c8c7b8..fd7b84e 100644 --- a/stellar_model/response/payments_response.py +++ b/stellar_model/response/payments_response.py @@ -31,7 +31,7 @@ def __init__(self, records): f"Please try to upgrade the library or raise an issue at {__issues__}." ) parser = _OPERATION_TYPE_I_MAP[op_type] - model = parser.parse_obj(record) + model = parser.model_validate(record) model_records.append(model) super().__init__(records=model_records) diff --git a/tests/model/horizon/test_account.py b/tests/model/horizon/test_account.py index ed510a7..30182b3 100644 --- a/tests/model/horizon/test_account.py +++ b/tests/model/horizon/test_account.py @@ -10,7 +10,7 @@ class TestAccount(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("account.json") - parsed_data = Account.parse_obj(raw_data) + parsed_data = Account.model_validate(raw_data) self.assertEqual( parsed_data.id, "GDI73WJ4SX7LOG3XZDJC3KCK6ED6E5NBYK2JUBQSPBCNNWEG3ZN7T75U" ) diff --git a/tests/model/horizon/test_account_data.py b/tests/model/horizon/test_account_data.py index 350d3a6..1e4756d 100644 --- a/tests/model/horizon/test_account_data.py +++ b/tests/model/horizon/test_account_data.py @@ -7,7 +7,7 @@ class TestAccountData(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("account_data.json") - parsed_data = AccountData.parse_obj(raw_data) + parsed_data = AccountData.model_validate(raw_data) self.assertEqual(parsed_data.value, "MQ==") self.assertEqual(parsed_data.sponsor, None) diff --git a/tests/model/horizon/test_asset_stat.py b/tests/model/horizon/test_asset_stat.py index 38be597..cf09b68 100644 --- a/tests/model/horizon/test_asset_stat.py +++ b/tests/model/horizon/test_asset_stat.py @@ -9,7 +9,7 @@ class TestAssetStat(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("asset_stat.json") - parsed_data = AssetStat.parse_obj(raw_data) + parsed_data = AssetStat.model_validate(raw_data) self.assertEqual(parsed_data.asset_type, "credit_alphanum4") self.assertEqual(parsed_data.asset_code, "ZX2") self.assertEqual( diff --git a/tests/model/horizon/test_claimable_balance.py b/tests/model/horizon/test_claimable_balance.py index f81c3b8..7dead55 100644 --- a/tests/model/horizon/test_claimable_balance.py +++ b/tests/model/horizon/test_claimable_balance.py @@ -10,7 +10,7 @@ class TestClaimableBalance(unittest.TestCase): def test_unconditional_valid(self): raw_data = load_horizon_file("claimable_balance_unconditional.json") - parsed_data = ClaimableBalance.parse_obj(raw_data) + parsed_data = ClaimableBalance.model_validate(raw_data) self.assertEqual( parsed_data.id, "0000000035950db8eb2f303c37b67890aff15a26b5c16693aba4b40dcd31b54162e60456", @@ -43,7 +43,7 @@ def test_unconditional_valid(self): def test_conditional_valid(self): raw_data = load_horizon_file("claimable_balance_conditional.json") - parsed_data = ClaimableBalance.parse_obj(raw_data) + parsed_data = ClaimableBalance.model_validate(raw_data) self.assertEqual(len(parsed_data.claimants), 2) self.assertEqual( parsed_data.claimants[0].destination, diff --git a/tests/model/horizon/test_effects.py b/tests/model/horizon/test_effects.py index 0b22cd1..98ff630 100644 --- a/tests/model/horizon/test_effects.py +++ b/tests/model/horizon/test_effects.py @@ -9,7 +9,7 @@ """ raw_data = load_horizon_file("effects/") - parsed_data = AccountCreatedEffect.parse_obj(raw_data) + parsed_data = AccountCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "") self.assertEqual(parsed_data.paging_token, "") self.assertEqual(parsed_data.account, "") @@ -22,7 +22,7 @@ class TestEffects(unittest.TestCase): def test_valid_account_created(self): raw_data = load_horizon_file("effects/account_created.json") - parsed_data = AccountCreatedEffect.parse_obj(raw_data) + parsed_data = AccountCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661856401629185-0000000001") self.assertEqual(parsed_data.paging_token, "150661856401629185-1") self.assertEqual( @@ -39,7 +39,7 @@ def test_valid_account_created(self): def test_valid_account_removed(self): raw_data = load_horizon_file("effects/account_removed.json") - parsed_data = AccountRemovedEffect.parse_obj(raw_data) + parsed_data = AccountRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661749027127297-0000000003") self.assertEqual(parsed_data.paging_token, "150661749027127297-3") self.assertEqual( @@ -55,7 +55,7 @@ def test_valid_account_removed(self): def test_valid_account_credited(self): raw_data = load_horizon_file("effects/account_credited.json") - parsed_data = AccountCreditedEffect.parse_obj(raw_data) + parsed_data = AccountCreditedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661749027127297-0000000002") self.assertEqual(parsed_data.paging_token, "150661749027127297-2") self.assertEqual( @@ -75,7 +75,7 @@ def test_valid_account_credited(self): def test_valid_account_debited(self): raw_data = load_horizon_file("effects/account_debited.json") - parsed_data = AccountDebitedEffect.parse_obj(raw_data) + parsed_data = AccountDebitedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661856401629185-0000000002") self.assertEqual(parsed_data.paging_token, "150661856401629185-2") self.assertEqual( @@ -95,7 +95,7 @@ def test_valid_account_debited(self): def test_valid_account_thresholds_updated(self): raw_data = load_horizon_file("effects/account_thresholds_updated.json") - parsed_data = AccountThresholdsUpdatedEffect.parse_obj(raw_data) + parsed_data = AccountThresholdsUpdatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660954458435585-0000000001") self.assertEqual(parsed_data.paging_token, "150660954458435585-1") self.assertEqual( @@ -114,7 +114,7 @@ def test_valid_account_thresholds_updated(self): def test_valid_account_home_domain_updated(self): raw_data = load_horizon_file("effects/account_home_domain_updated.json") - parsed_data = AccountHomeDomainUpdatedEffect.parse_obj(raw_data) + parsed_data = AccountHomeDomainUpdatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150665691807358978-0000000001") self.assertEqual(parsed_data.paging_token, "150665691807358978-1") self.assertEqual( @@ -131,7 +131,7 @@ def test_valid_account_home_domain_updated(self): def test_valid_account_flags_updated(self): raw_data = load_horizon_file("effects/account_flags_updated.json") - parsed_data = AccountFlagsUpdatedEffect.parse_obj(raw_data) + parsed_data = AccountFlagsUpdatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150740432828043265-0000000001") self.assertEqual(parsed_data.paging_token, "150740432828043265-1") self.assertEqual( @@ -151,7 +151,7 @@ def test_valid_account_inflation_destination_updated(self): raw_data = load_horizon_file( "effects/account_inflation_destination_updated.json" ) - parsed_data = AccountInflationDestinationUpdatedEffect.parse_obj(raw_data) + parsed_data = AccountInflationDestinationUpdatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660920098471939-0000000002") self.assertEqual(parsed_data.paging_token, "150660920098471939-2") self.assertEqual( @@ -167,7 +167,7 @@ def test_valid_account_inflation_destination_updated(self): def test_valid_signer_created(self): raw_data = load_horizon_file("effects/signer_created.json") - parsed_data = SignerCreatedEffect.parse_obj(raw_data) + parsed_data = SignerCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661856401629185-0000000003") self.assertEqual(parsed_data.paging_token, "150661856401629185-3") self.assertEqual( @@ -189,7 +189,7 @@ def test_valid_signer_created(self): def test_valid_signer_removed(self): raw_data = load_horizon_file("effects/signer_removed.json") - parsed_data = SignerRemovedEffect.parse_obj(raw_data) + parsed_data = SignerRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661134846902279-0000000002") self.assertEqual(parsed_data.paging_token, "150661134846902279-2") self.assertEqual( @@ -211,7 +211,7 @@ def test_valid_signer_removed(self): def test_valid_signer_updated(self): raw_data = load_horizon_file("effects/signer_updated.json") - parsed_data = SignerUpdatedEffect.parse_obj(raw_data) + parsed_data = SignerUpdatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660954458435585-0000000002") self.assertEqual(parsed_data.paging_token, "150660954458435585-2") self.assertEqual( @@ -233,7 +233,7 @@ def test_valid_signer_updated(self): def test_valid_trustline_created(self): raw_data = load_horizon_file("effects/trustline_created.json") - parsed_data = TrustlineCreatedEffect.parse_obj(raw_data) + parsed_data = TrustlineCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660636630859777-0000000001") self.assertEqual(parsed_data.paging_token, "150660636630859777-1") self.assertEqual( @@ -256,7 +256,7 @@ def test_valid_trustline_created(self): def test_valid_trustline_removed(self): raw_data = load_horizon_file("effects/trustline_removed.json") - parsed_data = TrustlineRemovedEffect.parse_obj(raw_data) + parsed_data = TrustlineRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660924393627649-0000000001") self.assertEqual(parsed_data.paging_token, "150660924393627649-1") self.assertEqual( @@ -279,7 +279,7 @@ def test_valid_trustline_removed(self): def test_valid_trustline_updated(self): raw_data = load_horizon_file("effects/trustline_updated.json") - parsed_data = TrustlineUpdatedEffect.parse_obj(raw_data) + parsed_data = TrustlineUpdatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660975933218817-0000000001") self.assertEqual(parsed_data.paging_token, "150660975933218817-1") self.assertEqual( @@ -302,7 +302,7 @@ def test_valid_trustline_updated(self): def test_valid_trustline_authorized(self): raw_data = load_horizon_file("effects/trustline_authorized.json") - parsed_data = TrustlineAuthorizedEffect.parse_obj(raw_data) + parsed_data = TrustlineAuthorizedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660791249526785-0000000001") self.assertEqual(parsed_data.paging_token, "150660791249526785-1") self.assertEqual( @@ -324,7 +324,7 @@ def test_valid_trustline_authorized(self): def test_valid_trustline_deauthorized(self): raw_data = load_horizon_file("effects/trustline_deauthorized.json") - parsed_data = TrustlineDeauthorizedEffect.parse_obj(raw_data) + parsed_data = TrustlineDeauthorizedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150662573661081605-0000000001") self.assertEqual(parsed_data.paging_token, "150662573661081605-1") self.assertEqual( @@ -348,7 +348,7 @@ def test_valid_trustline_authorized_to_maintain_liabilities(self): raw_data = load_horizon_file( "effects/trustline_authorized_to_maintain_liabilities.json" ) - parsed_data = TrustlineAuthorizedToMaintainLiabilitiesEffect.parse_obj(raw_data) + parsed_data = TrustlineAuthorizedToMaintainLiabilitiesEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660791249526794-0000000001") self.assertEqual(parsed_data.paging_token, "150660791249526794-1") self.assertEqual( @@ -372,7 +372,7 @@ def test_valid_trustline_authorized_to_maintain_liabilities(self): def test_valid_trustline_flags_updated(self): raw_data = load_horizon_file("effects/trustline_flags_updated.json") - parsed_data = TrustlineFlagsUpdatedEffect.parse_obj(raw_data) + parsed_data = TrustlineFlagsUpdatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660791249526785-0000000002") self.assertEqual(parsed_data.paging_token, "150660791249526785-2") self.assertEqual( @@ -410,7 +410,7 @@ def test_valid_offer_updated(self): def test_valid_trade(self): raw_data = load_horizon_file("effects/trade.json") - parsed_data = TradeEffect.parse_obj(raw_data) + parsed_data = TradeEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660580796153857-0000000001") self.assertEqual(parsed_data.paging_token, "150660580796153857-1") self.assertEqual( @@ -442,7 +442,7 @@ def test_valid_trade(self): def test_valid_data_created(self): raw_data = load_horizon_file("effects/data_created.json") - parsed_data = DataCreatedEffect.parse_obj(raw_data) + parsed_data = DataCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660636630765571-0000000001") self.assertEqual(parsed_data.paging_token, "150660636630765571-1") self.assertEqual( @@ -463,7 +463,7 @@ def test_valid_data_created(self): def test_valid_data_removed(self): raw_data = load_horizon_file("effects/data_removed.json") - parsed_data = DataRemovedEffect.parse_obj(raw_data) + parsed_data = DataRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150660636630765572-0000000001") self.assertEqual(parsed_data.paging_token, "150660636630765572-1") self.assertEqual( @@ -480,7 +480,7 @@ def test_valid_data_removed(self): def test_valid_data_updated(self): raw_data = load_horizon_file("effects/data_updated.json") - parsed_data = DataUpdatedEffect.parse_obj(raw_data) + parsed_data = DataUpdatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661027472793603-0000000001") self.assertEqual(parsed_data.paging_token, "150661027472793603-1") self.assertEqual( @@ -501,7 +501,7 @@ def test_valid_data_updated(self): def test_valid_sequence_bumped(self): raw_data = load_horizon_file("effects/sequence_bumped.json") - parsed_data = SequenceBumpedEffect.parse_obj(raw_data) + parsed_data = SequenceBumpedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0151249850311778305-0000000001") self.assertEqual(parsed_data.paging_token, "151249850311778305-1") self.assertEqual( @@ -518,7 +518,7 @@ def test_valid_sequence_bumped(self): def test_valid_claimable_balance_created(self): raw_data = load_horizon_file("effects/claimable_balance_created.json") - parsed_data = ClaimableBalanceCreatedEffect.parse_obj(raw_data) + parsed_data = ClaimableBalanceCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150684654087864322-0000000001") self.assertEqual(parsed_data.paging_token, "150684654087864322-1") self.assertEqual( @@ -543,7 +543,7 @@ def test_valid_claimable_balance_created(self): def test_valid_claimable_balance_claimant_created(self): raw_data = load_horizon_file("effects/claimable_balance_claimant_created.json") - parsed_data = ClaimableBalanceClaimantCreatedEffect.parse_obj(raw_data) + parsed_data = ClaimableBalanceClaimantCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150684654087864322-0000000003") self.assertEqual(parsed_data.paging_token, "150684654087864322-3") self.assertEqual( @@ -575,7 +575,7 @@ def test_valid_claimable_balance_claimant_created(self): def test_valid_claimable_balance_claimed(self): raw_data = load_horizon_file("effects/claimable_balance_claimed.json") - parsed_data = ClaimableBalanceClaimedEffect.parse_obj(raw_data) + parsed_data = ClaimableBalanceClaimedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150803053451329538-0000000001") self.assertEqual(parsed_data.paging_token, "150803053451329538-1") self.assertEqual( @@ -600,7 +600,7 @@ def test_valid_claimable_balance_claimed(self): def test_valid_account_sponsorship_created(self): raw_data = load_horizon_file("effects/account_sponsorship_created.json") - parsed_data = AccountSponsorshipCreatedEffect.parse_obj(raw_data) + parsed_data = AccountSponsorshipCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661134846902274-0000000004") self.assertEqual(parsed_data.paging_token, "150661134846902274-4") self.assertEqual( @@ -623,7 +623,7 @@ def test_valid_account_sponsorship_updated(self): def test_valid_account_sponsorship_removed(self): raw_data = load_horizon_file("effects/account_sponsorship_removed.json") - parsed_data = AccountSponsorshipRemovedEffect.parse_obj(raw_data) + parsed_data = AccountSponsorshipRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0151324471070908417-0000000004") self.assertEqual(parsed_data.paging_token, "151324471070908417-4") self.assertEqual( @@ -643,7 +643,7 @@ def test_valid_account_sponsorship_removed(self): def test_valid_trustline_sponsorship_created(self): raw_data = load_horizon_file("effects/trustline_sponsorship_created.json") - parsed_data = TrustlineSponsorshipCreatedEffect.parse_obj(raw_data) + parsed_data = TrustlineSponsorshipCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661134846902276-0000000002") self.assertEqual(parsed_data.paging_token, "150661134846902276-2") self.assertEqual( @@ -670,7 +670,7 @@ def test_valid_trustline_sponsorship_updated(self): def test_valid_trustline_sponsorship_removed(self): raw_data = load_horizon_file("effects/trustline_sponsorship_removed.json") - parsed_data = TrustlineSponsorshipRemovedEffect.parse_obj(raw_data) + parsed_data = TrustlineSponsorshipRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150671008977530881-0000000002") self.assertEqual(parsed_data.paging_token, "150671008977530881-2") self.assertEqual( @@ -694,7 +694,7 @@ def test_valid_trustline_sponsorship_removed(self): def test_valid_data_sponsorship_created(self): raw_data = load_horizon_file("effects/data_sponsorship_created.json") - parsed_data = DataSponsorshipCreatedEffect.parse_obj(raw_data) + parsed_data = DataSponsorshipCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0003520460138483714-0000000002") self.assertEqual(parsed_data.paging_token, "3520460138483714-2") self.assertEqual( @@ -718,7 +718,7 @@ def test_valid_data_sponsorship_updated(self): def test_valid_data_sponsorship_removed(self): raw_data = load_horizon_file("effects/data_sponsorship_removed.json") - parsed_data = DataSponsorshipRemovedEffect.parse_obj(raw_data) + parsed_data = DataSponsorshipRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0003520511678095361-0000000001") self.assertEqual(parsed_data.paging_token, "3520511678095361-1") self.assertEqual( @@ -741,7 +741,7 @@ def test_valid_claimable_balance_sponsorship_created(self): raw_data = load_horizon_file( "effects/claimable_balance_sponsorship_created.json" ) - parsed_data = ClaimableBalanceSponsorshipCreatedEffect.parse_obj(raw_data) + parsed_data = ClaimableBalanceSponsorshipCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150684654087864322-0000000005") self.assertEqual(parsed_data.paging_token, "150684654087864322-5") self.assertEqual( @@ -770,7 +770,7 @@ def test_valid_claimable_balance_sponsorship_removed(self): raw_data = load_horizon_file( "effects/claimable_balance_sponsorship_removed.json" ) - parsed_data = ClaimableBalanceSponsorshipRemovedEffect.parse_obj(raw_data) + parsed_data = ClaimableBalanceSponsorshipRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150803053451329538-0000000003") self.assertEqual(parsed_data.paging_token, "150803053451329538-3") self.assertEqual( @@ -794,7 +794,7 @@ def test_valid_claimable_balance_sponsorship_removed(self): def test_valid_signer_sponsorship_created(self): raw_data = load_horizon_file("effects/signer_sponsorship_created.json") - parsed_data = SignerSponsorshipCreatedEffect.parse_obj(raw_data) + parsed_data = SignerSponsorshipCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661134846902275-0000000002") self.assertEqual(parsed_data.paging_token, "150661134846902275-2") self.assertEqual( @@ -821,7 +821,7 @@ def test_valid_signer_sponsorship_updated(self): def test_valid_signer_sponsorship_removed(self): raw_data = load_horizon_file("effects/signer_sponsorship_removed.json") - parsed_data = SignerSponsorshipRemovedEffect.parse_obj(raw_data) + parsed_data = SignerSponsorshipRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0150661624473337857-0000000002") self.assertEqual(parsed_data.paging_token, "150661624473337857-2") self.assertEqual( @@ -845,7 +845,7 @@ def test_valid_signer_sponsorship_removed(self): def test_valid_claimable_balance_clawed_back(self): raw_data = load_horizon_file("effects/claimable_balance_clawed_back.json") - parsed_data = ClaimableBalanceClawedBackEffect.parse_obj(raw_data) + parsed_data = ClaimableBalanceClawedBackEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0003513936083165185-0000000001") self.assertEqual(parsed_data.paging_token, "3513936083165185-1") self.assertEqual( @@ -865,7 +865,7 @@ def test_valid_claimable_balance_clawed_back(self): def test_liquidity_pool_deposited(self): raw_data = load_horizon_file("effects/liquidity_pool_deposited.json") - parsed_data = LiquidityPoolDepositedEffect.parse_obj(raw_data) + parsed_data = LiquidityPoolDepositedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0001579044726386689-0000000001") self.assertEqual(parsed_data.paging_token, "1579044726386689-1") self.assertEqual( @@ -945,7 +945,7 @@ def test_liquidity_pool_deposited(self): def test_liquidity_pool_withdrew(self): raw_data = load_horizon_file("effects/liquidity_pool_withdrew.json") - parsed_data = LiquidityPoolWithdrewEffect.parse_obj(raw_data) + parsed_data = LiquidityPoolWithdrewEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0001579096265998337-0000000001") self.assertEqual(parsed_data.paging_token, "1579096265998337-1") self.assertEqual( @@ -1025,7 +1025,7 @@ def test_liquidity_pool_withdrew(self): def test_liquidity_pool_trade(self): raw_data = load_horizon_file("effects/liquidity_pool_trade.json") - parsed_data = LiquidityPoolTradeEffect.parse_obj(raw_data) + parsed_data = LiquidityPoolTradeEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0001579418388553729-0000000003") self.assertEqual(parsed_data.paging_token, "1579418388553729-3") self.assertEqual( @@ -1100,7 +1100,7 @@ def test_liquidity_pool_trade(self): def test_liquidity_pool_created(self): raw_data = load_horizon_file("effects/liquidity_pool_created.json") - parsed_data = LiquidityPoolCreatedEffect.parse_obj(raw_data) + parsed_data = LiquidityPoolCreatedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0001578868632723457-0000000002") self.assertEqual(parsed_data.paging_token, "1578868632723457-2") self.assertEqual( @@ -1129,7 +1129,7 @@ def test_liquidity_pool_created(self): def test_liquidity_pool_removed(self): raw_data = load_horizon_file("effects/liquidity_pool_removed.json") - parsed_data = LiquidityPoolRemovedEffect.parse_obj(raw_data) + parsed_data = LiquidityPoolRemovedEffect.model_validate(raw_data) self.assertEqual(parsed_data.id, "0179972298072752130-0000000002") self.assertEqual(parsed_data.paging_token, "179972298072752130-2") self.assertEqual( diff --git a/tests/model/horizon/test_fee_stats.py b/tests/model/horizon/test_fee_stats.py index 9f28437..7298795 100644 --- a/tests/model/horizon/test_fee_stats.py +++ b/tests/model/horizon/test_fee_stats.py @@ -9,7 +9,7 @@ class TestFeeStats(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("fee_stats.json") - parsed_data = FeeStats.parse_obj(raw_data) + parsed_data = FeeStats.model_validate(raw_data) self.assertEqual(parsed_data.last_ledger, 35068310) self.assertEqual(parsed_data.last_ledger_base_fee, 100) self.assertEqual(parsed_data.ledger_capacity_usage, Decimal("0.16")) diff --git a/tests/model/horizon/test_ledger.py b/tests/model/horizon/test_ledger.py index d57bae7..9ea5226 100644 --- a/tests/model/horizon/test_ledger.py +++ b/tests/model/horizon/test_ledger.py @@ -10,7 +10,7 @@ class TestLedger(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("ledger.json") - parsed_data = Ledger.parse_obj(raw_data) + parsed_data = Ledger.model_validate(raw_data) self.assertEqual( parsed_data.id, "548393ec23959e1959a62f003029ecf96be89e13df036073bf64918996ec4227", diff --git a/tests/model/horizon/test_liquidity_pool.py b/tests/model/horizon/test_liquidity_pool.py index 0323278..17f8f7d 100644 --- a/tests/model/horizon/test_liquidity_pool.py +++ b/tests/model/horizon/test_liquidity_pool.py @@ -10,7 +10,7 @@ class TestLiquidityPool(unittest.TestCase): def test_valid_native(self): raw_data = load_horizon_file("liquidity_pool_native.json") - parsed_data = LiquidityPool.parse_obj(raw_data) + parsed_data = LiquidityPool.model_validate(raw_data) self.assertEqual( parsed_data.id, "2389378a6156eedfac66daa000d24c926431c3e667b9f754771964f27a6da6ab", @@ -43,7 +43,7 @@ def test_valid_native(self): def test_valid_alphanum(self): raw_data = load_horizon_file("liquidity_pool_alphanum.json") - parsed_data = LiquidityPool.parse_obj(raw_data) + parsed_data = LiquidityPool.model_validate(raw_data) self.assertEqual( parsed_data.id, "2389378a6156eedfac66daa000d24c926431c3e667b9f754771964f27a6da6ab", diff --git a/tests/model/horizon/test_offer.py b/tests/model/horizon/test_offer.py index 1647382..370e6fa 100644 --- a/tests/model/horizon/test_offer.py +++ b/tests/model/horizon/test_offer.py @@ -10,7 +10,7 @@ class TestOffer(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("offer.json") - parsed_data = Offer.parse_obj(raw_data) + parsed_data = Offer.model_validate(raw_data) self.assertEqual(parsed_data.id, "544689347") self.assertEqual(parsed_data.paging_token, "544689347") self.assertEqual( diff --git a/tests/model/horizon/test_operations.py b/tests/model/horizon/test_operations.py index 833378f..1e6d87b 100644 --- a/tests/model/horizon/test_operations.py +++ b/tests/model/horizon/test_operations.py @@ -9,7 +9,7 @@ """ raw_data = load_horizon_file("operations/") - parsed_data = CreateAccountOperation.parse_obj(raw_data) + parsed_data = CreateAccountOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "") self.assertEqual(parsed_data.paging_token, "") self.assertEqual(parsed_data.transaction_successful, True) @@ -26,7 +26,7 @@ class TestOperations(unittest.TestCase): def test_valid_create_account_operation(self): raw_data = load_horizon_file("operations/create_account.json") - parsed_data = CreateAccountOperation.parse_obj(raw_data) + parsed_data = CreateAccountOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150661852106629126") self.assertEqual(parsed_data.paging_token, "150661852106629126") self.assertEqual(parsed_data.transaction_successful, True) @@ -58,7 +58,7 @@ def test_valid_create_account_operation(self): def test_valid_payment_operation(self): raw_data = load_horizon_file("operations/payment.json") - parsed_data = PaymentOperation.parse_obj(raw_data) + parsed_data = PaymentOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150661113372200961") self.assertEqual(parsed_data.paging_token, "150661113372200961") self.assertEqual(parsed_data.transaction_successful, True) @@ -89,7 +89,7 @@ def test_valid_payment_operation(self): def test_valid_path_payment_strict_receive_operation(self): raw_data = load_horizon_file("operations/path_payment_strict_receive.json") - parsed_data = PathPaymentStrictReceiveOperation.parse_obj(raw_data) + parsed_data = PathPaymentStrictReceiveOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150661572933464065") self.assertEqual(parsed_data.paging_token, "150661572933464065") self.assertEqual(parsed_data.transaction_successful, False) @@ -141,7 +141,7 @@ def test_valid_path_payment_strict_receive_operation(self): def test_valid_manage_sell_offer_operation(self): raw_data = load_horizon_file("operations/manage_sell_offer.json") - parsed_data = ManageSellOfferOperation.parse_obj(raw_data) + parsed_data = ManageSellOfferOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150661572935458818") self.assertEqual(parsed_data.paging_token, "150661572935458818") self.assertEqual(parsed_data.transaction_successful, True) @@ -177,7 +177,7 @@ def test_valid_manage_sell_offer_operation(self): def test_valid_create_passive_sell_offer_operation(self): raw_data = load_horizon_file("operations/create_passive_sell_offer.json") - parsed_data = CreatePassiveSellOfferOperation.parse_obj(raw_data) + parsed_data = CreatePassiveSellOfferOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150701833957081089") self.assertEqual(parsed_data.paging_token, "150701833957081089") self.assertEqual(parsed_data.transaction_successful, True) @@ -216,7 +216,7 @@ def test_valid_create_passive_sell_offer_operation(self): def test_valid_set_options_operation(self): raw_data = load_horizon_file("operations/set_options.json") - parsed_data = SetOptionsOperation.parse_obj(raw_data) + parsed_data = SetOptionsOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "2696453482881025") self.assertEqual(parsed_data.paging_token, "2696453482881025") self.assertEqual(parsed_data.transaction_successful, True) @@ -262,7 +262,7 @@ def test_valid_set_options_operation(self): def test_valid_change_trust_operation_asset(self): raw_data = load_horizon_file("operations/change_trust_asset.json") - parsed_data = ChangeTrustOperation.parse_obj(raw_data) + parsed_data = ChangeTrustOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150661512804089860") self.assertEqual(parsed_data.paging_token, "150661512804089860") self.assertEqual(parsed_data.transaction_successful, True) @@ -303,7 +303,7 @@ def test_valid_change_trust_operation_asset(self): def test_valid_change_trust_operation_liquidity_pool_id(self): raw_data = load_horizon_file("operations/change_trust_liquidity_pool_id.json") - parsed_data = ChangeTrustOperation.parse_obj(raw_data) + parsed_data = ChangeTrustOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "1578868632723457") self.assertEqual(parsed_data.paging_token, "1578868632723457") self.assertEqual(parsed_data.transaction_successful, True) @@ -353,7 +353,7 @@ def test_valid_change_trust_operation_liquidity_pool_id(self): def test_valid_allow_trust_operation(self): raw_data = load_horizon_file("operations/allow_trust.json") - parsed_data = AllowTrustOperation.parse_obj(raw_data) + parsed_data = AllowTrustOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150662449110290439") self.assertEqual(parsed_data.paging_token, "150662449110290439") self.assertEqual(parsed_data.transaction_successful, True) @@ -391,7 +391,7 @@ def test_valid_allow_trust_operation(self): def test_valid_account_merge_operation(self): raw_data = load_horizon_file("operations/account_merge.json") - parsed_data = AccountMergeOperation.parse_obj(raw_data) + parsed_data = AccountMergeOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150661877876133889") self.assertEqual(parsed_data.paging_token, "150661877876133889") self.assertEqual(parsed_data.transaction_successful, True) @@ -421,7 +421,7 @@ def test_valid_account_merge_operation(self): def test_valid_inflation_operation(self): raw_data = load_horizon_file("operations/inflation.json") - parsed_data = InflationOperation.parse_obj(raw_data) + parsed_data = InflationOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "85376614040350721") self.assertEqual(parsed_data.paging_token, "85376614040350721") self.assertEqual(parsed_data.transaction_successful, False) @@ -444,7 +444,7 @@ def test_valid_inflation_operation(self): def test_valid_manage_data_operation(self): raw_data = load_horizon_file("operations/manage_data.json") - parsed_data = ManageDataOperation.parse_obj(raw_data) + parsed_data = ManageDataOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150660585091022850") self.assertEqual(parsed_data.paging_token, "150660585091022850") self.assertEqual(parsed_data.transaction_successful, True) @@ -472,7 +472,7 @@ def test_valid_manage_data_operation(self): def test_valid_bump_sequence_operation(self): raw_data = load_horizon_file("operations/bump_sequence.json") - parsed_data = BumpSequenceOperation.parse_obj(raw_data) + parsed_data = BumpSequenceOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150675003296243713") self.assertEqual(parsed_data.paging_token, "150675003296243713") self.assertEqual(parsed_data.transaction_successful, True) @@ -496,7 +496,7 @@ def test_valid_bump_sequence_operation(self): def test_valid_manage_buy_offer_operation(self): raw_data = load_horizon_file("operations/manage_buy_offer.json") - parsed_data = ManageBuyOfferOperation.parse_obj(raw_data) + parsed_data = ManageBuyOfferOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150661598703333378") self.assertEqual(parsed_data.paging_token, "150661598703333378") self.assertEqual(parsed_data.transaction_successful, True) @@ -533,7 +533,7 @@ def test_valid_manage_buy_offer_operation(self): def test_valid_path_payment_strict_send_operation(self): raw_data = load_horizon_file("operations/path_payment_strict_send.json") - parsed_data = PathPaymentStrictSendOperation.parse_obj(raw_data) + parsed_data = PathPaymentStrictSendOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150660589386170369") self.assertEqual(parsed_data.paging_token, "150660589386170369") self.assertEqual(parsed_data.transaction_successful, True) @@ -588,7 +588,7 @@ def test_valid_path_payment_strict_send_operation(self): def test_valid_create_claimable_balance_operation(self): raw_data = load_horizon_file("operations/create_claimable_balance.json") - parsed_data = CreateClaimableBalanceOperation.parse_obj(raw_data) + parsed_data = CreateClaimableBalanceOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150684654087864322") self.assertEqual(parsed_data.paging_token, "150684654087864322") self.assertEqual(parsed_data.transaction_successful, True) @@ -637,7 +637,7 @@ def test_valid_create_claimable_balance_operation(self): def test_valid_claim_claimable_balance_operation(self): raw_data = load_horizon_file("operations/claim_claimable_balance.json") - parsed_data = ClaimClaimableBalanceOperation.parse_obj(raw_data) + parsed_data = ClaimClaimableBalanceOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "2730894825627649") self.assertEqual(parsed_data.paging_token, "2730894825627649") self.assertEqual(parsed_data.transaction_successful, True) @@ -668,7 +668,7 @@ def test_valid_claim_claimable_balance_operation(self): def test_valid_begin_sponsoring_future_reserves_operation(self): raw_data = load_horizon_file("operations/begin_sponsoring_future_reserves.json") - parsed_data = BeginSponsoringFutureReservesOperation.parse_obj(raw_data) + parsed_data = BeginSponsoringFutureReservesOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150660619450806273") self.assertEqual(parsed_data.paging_token, "150660619450806273") self.assertEqual(parsed_data.transaction_successful, True) @@ -695,7 +695,7 @@ def test_valid_begin_sponsoring_future_reserves_operation(self): def test_valid_end_sponsoring_future_reserves_operation(self): raw_data = load_horizon_file("operations/end_sponsoring_future_reserves.json") - parsed_data = EndSponsoringFutureReservesOperation.parse_obj(raw_data) + parsed_data = EndSponsoringFutureReservesOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "150660606565855256") self.assertEqual(parsed_data.paging_token, "150660606565855256") self.assertEqual(parsed_data.transaction_successful, True) @@ -722,7 +722,7 @@ def test_valid_end_sponsoring_future_reserves_operation(self): def test_valid_revoke_sponsorship_operation(self): raw_data = load_horizon_file("operations/revoke_sponsorship.json") - parsed_data = RevokeSponsorshipOperation.parse_obj(raw_data) + parsed_data = RevokeSponsorshipOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "2731345797189633") self.assertEqual(parsed_data.paging_token, "2731345797189633") self.assertEqual(parsed_data.transaction_successful, True) @@ -749,7 +749,7 @@ def test_valid_revoke_sponsorship_operation(self): def test_valid_clawback_operation(self): raw_data = load_horizon_file("operations/clawback.json") - parsed_data = ClawbackOperation.parse_obj(raw_data) + parsed_data = ClawbackOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "3510036252856321") self.assertEqual(parsed_data.paging_token, "3510036252856321") self.assertEqual(parsed_data.transaction_successful, True) @@ -783,7 +783,7 @@ def test_valid_clawback_operation(self): def test_valid_clawback_claimable_balance_operation(self): raw_data = load_horizon_file("operations/clawback_claimable_balance.json") - parsed_data = ClawbackClaimableBalanceOperation.parse_obj(raw_data) + parsed_data = ClawbackClaimableBalanceOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "3513936083165185") self.assertEqual(parsed_data.paging_token, "3513936083165185") self.assertEqual(parsed_data.transaction_successful, True) @@ -810,7 +810,7 @@ def test_valid_clawback_claimable_balance_operation(self): def test_valid_set_trust_line_flags_operation(self): raw_data = load_horizon_file("operations/set_trust_line_flags.json") - parsed_data = SetTrustLineFlagsOperation.parse_obj(raw_data) + parsed_data = SetTrustLineFlagsOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "3513373442449409") self.assertEqual(parsed_data.paging_token, "3513373442449409") self.assertEqual(parsed_data.transaction_successful, True) @@ -847,7 +847,7 @@ def test_valid_set_trust_line_flags_operation(self): def test_valid_liquidity_pool_deposit_operation(self): raw_data = load_horizon_file("operations/liquidity_pool_deposit.json") - parsed_data = LiquidityPoolDepositOperation.parse_obj(raw_data) + parsed_data = LiquidityPoolDepositOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "1579044726386689") self.assertEqual(parsed_data.paging_token, "1579044726386689") self.assertEqual(parsed_data.transaction_successful, True) @@ -927,7 +927,7 @@ def test_valid_liquidity_pool_deposit_operation(self): def test_valid_liquidity_pool_withdraw_operation(self): raw_data = load_horizon_file("operations/liquidity_pool_withdraw.json") - parsed_data = LiquidityPoolWithdrawOperation.parse_obj(raw_data) + parsed_data = LiquidityPoolWithdrawOperation.model_validate(raw_data) self.assertEqual(parsed_data.id, "1579096265998337") self.assertEqual(parsed_data.paging_token, "1579096265998337") self.assertEqual(parsed_data.transaction_successful, True) diff --git a/tests/model/horizon/test_order_book_summary.py b/tests/model/horizon/test_order_book_summary.py index e284ad6..9f41a67 100644 --- a/tests/model/horizon/test_order_book_summary.py +++ b/tests/model/horizon/test_order_book_summary.py @@ -9,7 +9,7 @@ class TestOrderBookSummary(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("order_book_summary.json") - parsed_data = OrderBookSummary.parse_obj(raw_data) + parsed_data = OrderBookSummary.model_validate(raw_data) self.assertEqual(parsed_data.base.asset_type, "native") self.assertEqual(parsed_data.base.asset_code, None) self.assertEqual(parsed_data.base.asset_issuer, None) diff --git a/tests/model/horizon/test_path.py b/tests/model/horizon/test_path.py index fb91a9c..3dedf1f 100644 --- a/tests/model/horizon/test_path.py +++ b/tests/model/horizon/test_path.py @@ -9,7 +9,7 @@ class TestPath(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("path.json") - parsed_data = Path.parse_obj(raw_data) + parsed_data = Path.model_validate(raw_data) self.assertEqual(parsed_data.source_asset_type, "credit_alphanum4") self.assertEqual(parsed_data.source_asset_code, "CNY") self.assertEqual( diff --git a/tests/model/horizon/test_root.py b/tests/model/horizon/test_root.py index 8510d0d..ddde3e4 100644 --- a/tests/model/horizon/test_root.py +++ b/tests/model/horizon/test_root.py @@ -8,7 +8,7 @@ class TestRoot(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("root.json") - parsed_data = Root.parse_obj(raw_data) + parsed_data = Root.model_validate(raw_data) self.assertEqual( parsed_data.horizon_version, "2.2.0-7d7e58007af55e7697223009fd24daf76aa908e2", diff --git a/tests/model/horizon/test_trade.py b/tests/model/horizon/test_trade.py index 27ea771..527bb9b 100644 --- a/tests/model/horizon/test_trade.py +++ b/tests/model/horizon/test_trade.py @@ -10,7 +10,7 @@ class TestTrade(unittest.TestCase): def test_valid_orderbook(self): raw_data = load_horizon_file("trade_orderbook.json") - parsed_data = Trade.parse_obj(raw_data) + parsed_data = Trade.model_validate(raw_data) self.assertEqual(parsed_data.id, "150615114272284677-0") self.assertEqual(parsed_data.paging_token, "150615114272284677-0") self.assertEqual( @@ -48,7 +48,7 @@ def test_valid_orderbook(self): def test_valid_liquidity_pool(self): raw_data = load_horizon_file("trade_liquidity_pool.json") - parsed_data = Trade.parse_obj(raw_data) + parsed_data = Trade.model_validate(raw_data) self.assertEqual(parsed_data.id, "1567602933510145-0") self.assertEqual(parsed_data.paging_token, "1567602933510145-0") self.assertEqual( diff --git a/tests/model/horizon/test_trade_aggregation.py b/tests/model/horizon/test_trade_aggregation.py index 93609de..a03d1c2 100644 --- a/tests/model/horizon/test_trade_aggregation.py +++ b/tests/model/horizon/test_trade_aggregation.py @@ -9,7 +9,7 @@ class TestTradeAggregation(unittest.TestCase): def test_valid(self): raw_data = load_horizon_file("trade_aggregation.json") - parsed_data = TradeAggregation.parse_obj(raw_data) + parsed_data = TradeAggregation.model_validate(raw_data) self.assertEqual(parsed_data.timestamp, 1619081700000) self.assertEqual(parsed_data.trade_count, 1) self.assertEqual(parsed_data.base_volume, Decimal("3.9000000")) diff --git a/tests/model/horizon/test_transaction.py b/tests/model/horizon/test_transaction.py index 23a755f..f324094 100644 --- a/tests/model/horizon/test_transaction.py +++ b/tests/model/horizon/test_transaction.py @@ -8,7 +8,7 @@ class TestTransaction(unittest.TestCase): def test_transaction_valid(self): raw_data = load_horizon_file("transaction.json") - parsed_data = Transaction.parse_obj(raw_data) + parsed_data = Transaction.model_validate(raw_data) self.assertEqual( parsed_data.id, "5ebd5c0af4385500b53dd63b0ef5f6e8feef1a7e1c86989be3cdcce825f3c0cc", @@ -98,7 +98,7 @@ def test_transaction_valid(self): def test_transaction_fee_bump_valid(self): raw_data = load_horizon_file("transaction_fee_bump.json") - parsed_data = Transaction.parse_obj(raw_data) + parsed_data = Transaction.model_validate(raw_data) self.assertEqual( parsed_data.id, "ac8cf91a1c0559091ba26573c0966191ae81466d5df4931af302f135d99c0d72", @@ -184,7 +184,7 @@ def test_transaction_fee_bump_valid(self): def test_transaction_muxed_account_valid(self): raw_data = load_horizon_file("transaction_muxed_account.json") - parsed_data = Transaction.parse_obj(raw_data) + parsed_data = Transaction.model_validate(raw_data) self.assertEqual( parsed_data.account_muxed, "MDSPXRRA5D4WD4LCR6NNZEHQJHHZ74UCPHXJT4SC7HCFWJFOFOLUUAAAAAAAAAAAPMRCO", diff --git a/tests/response/test_account_data_response.py b/tests/response/test_account_data_response.py index f8be2c2..21700e9 100644 --- a/tests/response/test_account_data_response.py +++ b/tests/response/test_account_data_response.py @@ -8,6 +8,6 @@ class TestAccountDataResponse(TestCase): def test_valid(self): raw_data = load_horizon_file("account_data.json") - parsed_data = AccountDataResponse.parse_obj(raw_data) + parsed_data = AccountDataResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, AccountDataResponse)) self.assertTrue(isinstance(parsed_data, AccountData)) diff --git a/tests/response/test_account_response.py b/tests/response/test_account_response.py index 0c3ba13..039c841 100644 --- a/tests/response/test_account_response.py +++ b/tests/response/test_account_response.py @@ -8,6 +8,6 @@ class TestAccountResponse(TestCase): def test_valid(self): raw_data = load_horizon_file("account.json") - parsed_data = AccountResponse.parse_obj(raw_data) + parsed_data = AccountResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, AccountResponse)) self.assertTrue(isinstance(parsed_data, Account)) diff --git a/tests/response/test_accounts_response.py b/tests/response/test_accounts_response.py index e9a1c96..4e2b754 100644 --- a/tests/response/test_accounts_response.py +++ b/tests/response/test_accounts_response.py @@ -8,7 +8,7 @@ class TestAccountsResponse(TestCase): def test_valid(self): raw_data = load_response_file("accounts_response.json") - parsed_data = AccountsResponse.parse_obj(raw_data) + parsed_data = AccountsResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 10) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, Account)) diff --git a/tests/response/test_assets_response.py b/tests/response/test_assets_response.py index 8b1c451..f754a19 100644 --- a/tests/response/test_assets_response.py +++ b/tests/response/test_assets_response.py @@ -8,7 +8,7 @@ class TestAssetsResponse(TestCase): def test_valid(self): raw_data = load_response_file("assets_response.json") - parsed_data = AssetsResponse.parse_obj(raw_data) + parsed_data = AssetsResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 100) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, AssetStat)) diff --git a/tests/response/test_claimable_balance_response.py b/tests/response/test_claimable_balance_response.py index 284ef8f..7904732 100644 --- a/tests/response/test_claimable_balance_response.py +++ b/tests/response/test_claimable_balance_response.py @@ -8,6 +8,6 @@ class TestClaimableBalanceResponse(TestCase): def test_valid(self): raw_data = load_horizon_file("claimable_balance_conditional.json") - parsed_data = ClaimableBalanceResponse.parse_obj(raw_data) + parsed_data = ClaimableBalanceResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, ClaimableBalanceResponse)) self.assertTrue(isinstance(parsed_data, ClaimableBalance)) diff --git a/tests/response/test_claimable_balances_response.py b/tests/response/test_claimable_balances_response.py index 1b52b9b..20d7e0c 100644 --- a/tests/response/test_claimable_balances_response.py +++ b/tests/response/test_claimable_balances_response.py @@ -8,7 +8,7 @@ class TestClaimableBalancesResponse(TestCase): def test_valid(self): raw_data = load_response_file("claimable_balances_response.json") - parsed_data = ClaimableBalancesResponse.parse_obj(raw_data) + parsed_data = ClaimableBalancesResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 20) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, ClaimableBalance)) diff --git a/tests/response/test_effect_response.py b/tests/response/test_effect_response.py index 3b0f5fa..d6464ad 100644 --- a/tests/response/test_effect_response.py +++ b/tests/response/test_effect_response.py @@ -111,7 +111,7 @@ class TestEffectResponse(TestCase): def test_valid(self): for op in ops: raw_data = load_horizon_file(f"effects/{op['filename']}") - parsed_data = EffectResponse.parse_obj(raw_data) + parsed_data = EffectResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, EffectResponse)) self.assertTrue(isinstance(parsed_data.record, op["class"])) self.assertEqual(raw_data["id"], parsed_data.record.id) diff --git a/tests/response/test_effects_response.py b/tests/response/test_effects_response.py index f98c891..34311dd 100644 --- a/tests/response/test_effects_response.py +++ b/tests/response/test_effects_response.py @@ -8,7 +8,7 @@ class TestEffectsResponse(TestCase): def test_valid(self): raw_data = load_response_file("effects_response.json") - parsed_data = EffectsResponse.parse_obj(raw_data) + parsed_data = EffectsResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 200) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, BaseEffect)) diff --git a/tests/response/test_error_response.py b/tests/response/test_error_response.py index 4e362fe..a587e1e 100644 --- a/tests/response/test_error_response.py +++ b/tests/response/test_error_response.py @@ -7,7 +7,7 @@ class TestErrorResponse(TestCase): def test_valid(self): raw_data = load_response_file("error_response.json") - parsed_data = ErrorResponse.parse_obj(raw_data) + parsed_data = ErrorResponse.model_validate(raw_data) self.assertEqual( parsed_data.type, "https://stellar.org/horizon-errors/transaction_failed" ) diff --git a/tests/response/test_fee_stats_response.py b/tests/response/test_fee_stats_response.py index 0e54a44..99f2c50 100644 --- a/tests/response/test_fee_stats_response.py +++ b/tests/response/test_fee_stats_response.py @@ -8,6 +8,6 @@ class TestFeeStatsResponse(TestCase): def test_valid(self): raw_data = load_horizon_file("fee_stats.json") - parsed_data = FeeStatsResponse.parse_obj(raw_data) + parsed_data = FeeStatsResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, FeeStatsResponse)) self.assertTrue(isinstance(parsed_data, FeeStats)) diff --git a/tests/response/test_ledger_response.py b/tests/response/test_ledger_response.py index 31281de..3b76a0a 100644 --- a/tests/response/test_ledger_response.py +++ b/tests/response/test_ledger_response.py @@ -8,6 +8,6 @@ class TestLedgerResponse(TestCase): def test_valid(self): raw_data = load_horizon_file("ledger.json") - parsed_data = LedgerResponse.parse_obj(raw_data) + parsed_data = LedgerResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, LedgerResponse)) self.assertTrue(isinstance(parsed_data, Ledger)) diff --git a/tests/response/test_ledgers_response.py b/tests/response/test_ledgers_response.py index 28ed94c..85b90aa 100644 --- a/tests/response/test_ledgers_response.py +++ b/tests/response/test_ledgers_response.py @@ -8,7 +8,7 @@ class TestLedgersResponse(TestCase): def test_valid(self): raw_data = load_response_file("ledgers_response.json") - parsed_data = LedgersResponse.parse_obj(raw_data) + parsed_data = LedgersResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 20) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, Ledger)) diff --git a/tests/response/test_liquidity_pool_response.py b/tests/response/test_liquidity_pool_response.py index b52ead7..131c88c 100644 --- a/tests/response/test_liquidity_pool_response.py +++ b/tests/response/test_liquidity_pool_response.py @@ -8,6 +8,6 @@ class TestLiquidityPoolResponse(TestCase): def test_valid(self): raw_data = load_horizon_file("liquidity_pool_alphanum.json") - parsed_data = LiquidityPoolResponse.parse_obj(raw_data) + parsed_data = LiquidityPoolResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, LiquidityPoolResponse)) self.assertTrue(isinstance(parsed_data, LiquidityPool)) diff --git a/tests/response/test_liquidity_pools_response.py b/tests/response/test_liquidity_pools_response.py index 24c1122..8abc731 100644 --- a/tests/response/test_liquidity_pools_response.py +++ b/tests/response/test_liquidity_pools_response.py @@ -8,7 +8,7 @@ class TestLiquidityPoolsResponse(TestCase): def test_valid(self): raw_data = load_response_file("liquidity_pools_response.json") - parsed_data = LiquidityPoolsResponse.parse_obj(raw_data) + parsed_data = LiquidityPoolsResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 10) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, LiquidityPool)) diff --git a/tests/response/test_offer_response.py b/tests/response/test_offer_response.py index a9c47ad..2855d2c 100644 --- a/tests/response/test_offer_response.py +++ b/tests/response/test_offer_response.py @@ -8,6 +8,6 @@ class TestOfferResponse(TestCase): def test_valid(self): raw_data = load_horizon_file("offer.json") - parsed_data = OfferResponse.parse_obj(raw_data) + parsed_data = OfferResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, OfferResponse)) self.assertTrue(isinstance(parsed_data, Offer)) diff --git a/tests/response/test_offers_response.py b/tests/response/test_offers_response.py index cef8152..4f96d3a 100644 --- a/tests/response/test_offers_response.py +++ b/tests/response/test_offers_response.py @@ -8,7 +8,7 @@ class TestOffersResponse(TestCase): def test_valid(self): raw_data = load_response_file("offers_response.json") - parsed_data = OffersResponse.parse_obj(raw_data) + parsed_data = OffersResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 20) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, Offer)) diff --git a/tests/response/test_operation_response.py b/tests/response/test_operation_response.py index 2ed46b9..15b6d17 100644 --- a/tests/response/test_operation_response.py +++ b/tests/response/test_operation_response.py @@ -57,7 +57,7 @@ class TestOperationResponse(TestCase): def test_valid(self): for op in ops: raw_data = load_horizon_file(f"operations/{op['filename']}") - parsed_data = OperationResponse.parse_obj(raw_data) + parsed_data = OperationResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, OperationResponse)) self.assertTrue(isinstance(parsed_data.record, op["class"])) self.assertEqual(raw_data["id"], parsed_data.record.id) diff --git a/tests/response/test_operations_response.py b/tests/response/test_operations_response.py index e8f4742..b02b365 100644 --- a/tests/response/test_operations_response.py +++ b/tests/response/test_operations_response.py @@ -34,7 +34,7 @@ class TestOperationsResponse(TestCase): def test_valid(self): raw_data = load_response_file("operations_response.json") - parsed_data = OperationsResponse.parse_obj(raw_data) + parsed_data = OperationsResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 18) for record in parsed_data.embedded.records: self.assertTrue(record.type in ops) diff --git a/tests/response/test_order_book_response.py b/tests/response/test_order_book_response.py index 6bb97c2..a140464 100644 --- a/tests/response/test_order_book_response.py +++ b/tests/response/test_order_book_response.py @@ -8,6 +8,6 @@ class TestLedgerResponse(TestCase): def test_valid(self): raw_data = load_response_file("order_book_response.json") - parsed_data = OrderBookResponse.parse_obj(raw_data) + parsed_data = OrderBookResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, OrderBookResponse)) self.assertTrue(isinstance(parsed_data, OrderBookSummary)) diff --git a/tests/response/test_paths_response.py b/tests/response/test_paths_response.py index 77f827d..864cbfb 100644 --- a/tests/response/test_paths_response.py +++ b/tests/response/test_paths_response.py @@ -8,7 +8,7 @@ class TestPathsResponse(TestCase): def test_valid(self): raw_data = load_response_file("paths_response.json") - parsed_data = PathsResponse.parse_obj(raw_data) + parsed_data = PathsResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 5) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, Path)) diff --git a/tests/response/test_payments_response.py b/tests/response/test_payments_response.py index e557ad0..1fdc622 100644 --- a/tests/response/test_payments_response.py +++ b/tests/response/test_payments_response.py @@ -17,7 +17,7 @@ class TestPaymentsResponse(TestCase): def test_valid(self): raw_data = load_response_file("payments_response.json") - parsed_data = PaymentsResponse.parse_obj(raw_data) + parsed_data = PaymentsResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 100) for record in parsed_data.embedded.records: self.assertTrue(record.type in payment_ops) diff --git a/tests/response/test_root_response.py b/tests/response/test_root_response.py index 656d3ec..ef87d4f 100644 --- a/tests/response/test_root_response.py +++ b/tests/response/test_root_response.py @@ -8,6 +8,6 @@ class TestRootResponse(TestCase): def test_valid(self): raw_data = load_horizon_file("root.json") - parsed_data = RootResponse.parse_obj(raw_data) + parsed_data = RootResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, RootResponse)) self.assertTrue(isinstance(parsed_data, Root)) diff --git a/tests/response/test_trade_aggregations_response.py b/tests/response/test_trade_aggregations_response.py index cf48f1d..eb8e995 100644 --- a/tests/response/test_trade_aggregations_response.py +++ b/tests/response/test_trade_aggregations_response.py @@ -8,7 +8,7 @@ class TestTradeAggregationsResponse(TestCase): def test_valid(self): raw_data = load_response_file("trade_aggregations_response.json") - parsed_data = TradeAggregationsResponse.parse_obj(raw_data) + parsed_data = TradeAggregationsResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 100) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, TradeAggregation)) diff --git a/tests/response/test_trades_response.py b/tests/response/test_trades_response.py index a79be71..141fabf 100644 --- a/tests/response/test_trades_response.py +++ b/tests/response/test_trades_response.py @@ -8,7 +8,7 @@ class TestTradesResponse(TestCase): def test_valid(self): raw_data = load_response_file("trades_response.json") - parsed_data = TradesResponse.parse_obj(raw_data) + parsed_data = TradesResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 100) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, Trade)) diff --git a/tests/response/test_transaction_response.py b/tests/response/test_transaction_response.py index bf43147..af11a50 100644 --- a/tests/response/test_transaction_response.py +++ b/tests/response/test_transaction_response.py @@ -8,6 +8,6 @@ class TestTransactionResponse(TestCase): def test_valid(self): raw_data = load_horizon_file("transaction.json") - parsed_data = TransactionResponse.parse_obj(raw_data) + parsed_data = TransactionResponse.model_validate(raw_data) self.assertTrue(isinstance(parsed_data, TransactionResponse)) self.assertTrue(isinstance(parsed_data, Transaction)) diff --git a/tests/response/test_transactions_response.py b/tests/response/test_transactions_response.py index 244bfe4..5425843 100644 --- a/tests/response/test_transactions_response.py +++ b/tests/response/test_transactions_response.py @@ -8,7 +8,7 @@ class TestTransactionsResponse(TestCase): def test_valid(self): raw_data = load_response_file("transactions_response.json") - parsed_data = TransactionsResponse.parse_obj(raw_data) + parsed_data = TransactionsResponse.model_validate(raw_data) self.assertEqual(len(parsed_data.embedded.records), 100) for record in parsed_data.embedded.records: self.assertTrue(isinstance(record, Transaction))