From d7b7562e8a252a6fb9e25d71095aa41e68c45f41 Mon Sep 17 00:00:00 2001 From: SREERAJ V RAJESH <119793289+cyberkutti-iedc@users.noreply.github.com> Date: Fri, 24 Nov 2023 08:15:48 +0530 Subject: [PATCH] Add files via upload --- LICENSE | 42 +++--- README.md | 1 - setup.py | 3 +- snaildb/__pycache__/__init__.cpython-310.pyc | Bin 0 -> 192 bytes snaildb/__pycache__/snaildb.cpython-310.pyc | Bin 0 -> 17963 bytes tests/test_snaildb.py | 132 ++++++++++++------- 6 files changed, 111 insertions(+), 67 deletions(-) create mode 100644 snaildb/__pycache__/__init__.cpython-310.pyc create mode 100644 snaildb/__pycache__/snaildb.cpython-310.pyc diff --git a/LICENSE b/LICENSE index d0c1c35..426f3be 100644 --- a/LICENSE +++ b/LICENSE @@ -1,21 +1,21 @@ -MIT License - -Copyright (c) 2023 SREERAJ V RAJESH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +MIT License + +Copyright (c) 2023 SREERAJ V RAJESH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index 7d6d4ae..c19ac21 100644 --- a/README.md +++ b/README.md @@ -164,4 +164,3 @@ Contributions are welcome! If you'd like to contribute to SnailDB, please check ## License This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. - diff --git a/setup.py b/setup.py index d3307c6..0266184 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name='snailDB', - version='0.0.1', + version='0.0.2', author='SREERAJ V RAJESH', author_email='cyberkutti@gmail.com', description='SnailDB is a lightweight, non-SQL database for Python, designed for simplicity and ease of use', @@ -13,6 +13,7 @@ long_description_content_type='text/markdown', url='https://github.com/cyberkutti-iedc/snailDB', packages=find_packages(), + keywords=["non-sql","database","python-database","lightwight database","non-sql database"], install_requires=[ 'fastjsonschema', 'ujson', diff --git a/snaildb/__pycache__/__init__.cpython-310.pyc b/snaildb/__pycache__/__init__.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..ebf48e451e6da4438d942e93fb0947d3b6405ebe GIT binary patch literal 192 zcmd1j<>g`kf_J$=spdfXF^Gc>lA4US*n{&DGjm*=ia@&jG?{O)7lQ;+lE4DD*yH09b8_P2S27f_0u_LXUutev zF~voxsYQudF<{j$P7pdJDJDKXGcU6wK3=b&@)n0pZhlH>PO2Tqu3{D-!Nb7C1OUM0 BD~SLA literal 0 HcmV?d00001 diff --git a/snaildb/__pycache__/snaildb.cpython-310.pyc b/snaildb/__pycache__/snaildb.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..72e0bb3ee28eac9b6cbf25ba5e2fe0699e8158e3 GIT binary patch literal 17963 zcmb_k36LCDdG2eDojtW$t+kRYuVmTQ`jGJf7+aPNl4Tj&Yp{HjCw7L>cCR$++1b_W zS=l?xIsys2COCvZ2o#~RN|8eqa#tl)3ArF4gd9}mPABAo98O45DFs55L;1e{^*K8u zuSr(buitdP%BchjGv2K7xAz_f5DLaUXU2%A4JiH|UK{7_*k!?+%=G%47E%?w~t#)^LZs+}swg z*w0$EKX1 z_|T(|AFR%t@PhoT^1K$BKUZs>s5H^@M6J;b3P&5&TK&*lg1%!_-2T(K(<+P2XMiWarZ%$8Hicf?5!m&ATra5J*E%xuN;Jr>>fEiS9gXgh?<&!ccm{*z}j_?h`5``nAm|0)X4D4VWPw%ncWRj%ziXLDuS zb6m^Id3hmY&dr~7K;D8pErPHGw~pQ#~pHq@qP$T z@*wiCYq{oZUdZf}N8~A=I6`ixya~OAG0qlu9KA;IYjX(274B9t6QJZs6W$hYd;%;-pxuhC17Jfy4tn(5YjiS;v z+eQTxI%D8&xuBLB$KxqGD9%(Dt24Fcva<0Y$jy*9z>$vc)o0aqJQKp{VuDSIl}fEq zYgQ^__~kn&^5%fq+7vO?zUcirw&4r{5=q+xD0AkTbR@`c1MdUpS#Q}t zZ>lTtqZ0RR-i#C1VdXtsvpIi=6KDPxhO z#Bj<8r>43FPrA(!6e<-gu2Q)g4P=(4jYX5vAm=Ipb6`C1^%$owqdU zrZ_!`mExg+N@ZrD(X7@Qex<^t$}&r4YfEbSq(zWBRjn_1Gi0FXk99JiFw_VtZDWm) zSm(qn#LEwC-)o+?Q?S6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HMF zK6rJg!jR8g@3#pZXmFJPpU~kYJi7+4iid$ivK=9X_SZ9Jlty$#n!cRltJPT9$#{O&NZcE+>*W{7n|OsqSyOm%DlU&NAHHP64i#r!|RaAO2RLV4us^1>>& zg!fxhyA~8X!YyCM?l!iXrAwV5)2l%*{1Bx(|A|~6$!8Jmuf|LfMosC#t|zQwemkP3 zbfXML&_P7#Anp<*@=Fk=HW?@JFtc`?x<{8JsZV&ml?AQBl&SXc7Wzal@VS7Us3kf> zHxtfxpwhZ2qAL#oMdz#V=^;*drsx`-F2L6Tw!bv5bLrxh>{>rVFxq7-OelH~p-+sO z_02NsiJGN^OHgx|zz$1Ng6RmHvQmRMIE!=~j~lsC;>fVM42vYkVhi}Z0x6=@0lw(W zm94|h=)79$;FTz$^w9~NSF_bexx_OpmQh661*(alAU!-kb#^93bTGm7Ei^o>+c0d5 z-&=@{Aq-$)TV^adjTPIoo;@=NqPZfHh@cA`j;D+Drd9GulcjzYZ}cL#jnTml!M6A# z(rEQDm^cn=sO!)t*&y!SxF=-l-#Duzu0-TkaU^v69HTM9)xd{!E9kq@Y84yS&dKLo09jGv* z3QsJJk(;q8G|W#iaaIF>adQHDZMKD^IR`su$RY&OU$@gLcD2Bz3^zY=sYePiLd{_t-~{Z zfQ0)Do+lB0%+xXV^ge3(7+<0RwLHc6kC-Nzig|eLHca#!`3Uh%r0p=1v}VuNp=v*j z?;Z|MUEBF}TaEM4Th*!JS=Qdk;yof6L-fJnkcsl;zjaU)P<;2ZEc-KLM*V4QfwdxwJ{D9S zs-MLGi$NAty!yl05!Co!1~9==k^hY&7", 25), ("city", "==", "Fantasyville")] + result = self.db.match_any(query) + self.assertEqual(len(result), 2) + self.assertEqual(result[0]["name"], "Bob") + self.assertEqual(result[1]["name"], "Charlie") if __name__ == '__main__': unittest.main()