Skip to main content

localDB is a Python package that allows you to generate a local database in the file system. With localDB, users can create, update, delete, and search a local database on their system. This package can be useful for applications that reire a simple and efficient local data storage solution. Additionally, being a local database solution, it does not require an internet connection or depend on external services.

Project description

License: MIT

LocalDB

localDB is a Python package that allows you to generate a local database in the file system. With localDB, users can create, update, delete, and search a local database on their system. This package can be useful for applications that reire a simple and efficient local data storage solution. Additionally, being a local database solution, it does not require an internet connection or depend on external services.

FolderData

  • createData: This method creates a new directory with the given name. It first checks whether a directory with the same name already exists or not. If it exists, then it raises an error message and returns None. Otherwise, it creates the new directory and returns the directory object. A message is printed to confirm that the directory has been created.

  • removeData: This method removes the directory with the given name. It first checks whether the directory exists or not. If it doesn't exist, it raises an error message and returns None. Otherwise, it removes the directory and returns the directory object.

  • findData: This method checks whether a directory with the given name exists or not. It returns a boolean value of True if the directory exists, and False if it doesn't exist.

Chases

  • The createChase method takes two arguments, name and chase. It checks if a data folder with the given name exists using the findData method. If it does not exist, it raises a TypeError. Otherwise, it creates a new text file with the given name in the data folder and returns the file object. Example: localdb.createChase("dataName", "chaseName")

  • The setChase method takes four arguments, name, chase, __newContent, and edit. It checks if the edit argument is either "a" or "w". If it is not, it raises a TypeError. It also checks if the data folder with the given name exists. If it does not exist, it raises a TypeError. Then, it opens the text file with the given name in the data folder with the appropriate editing mode. It writes the new content to the file and returns the number of characters written. Example: localdb.createChase("dataName", "chaseName", "content", "editType")

More Chases functions:

findChase, removeChase, readChase

These methods can be useful for managing and updating text files within a local data folder in a Python application.

Install

pip install localDataBase

Authors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

localDataBase-1.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

localDataBase-1.0-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file localDataBase-1.0.tar.gz.

File metadata

  • Download URL: localDataBase-1.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for localDataBase-1.0.tar.gz
Algorithm Hash digest
SHA256 356c187271fda35b3c661a3cd0c4d7a04f7a00061e19328f5899c9d00323a101
MD5 62b447e93e2cbd0bab0fca44b42b1313
BLAKE2b-256 d607310df5545f5bccedfb812066b7598ad2643aba1c6df527a2fa77a5527e76

See more details on using hashes here.

File details

Details for the file localDataBase-1.0-py3-none-any.whl.

File metadata

  • Download URL: localDataBase-1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for localDataBase-1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a722cca891c59230ace566abe88a8ca2ecc576ecaa246a0ccf4ecca17585e0b2
MD5 b3bf2495bd05e8cf45c38e9b21c94234
BLAKE2b-256 5d0085d94fc425579579e9927def530d1fa0b64836c680e5db4bbdaaa2ee00f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page