Skip to main content

This Python package creates a file locally in the user's device more easily.

Project description

LocalDataStoragePython-0.0.1


This Python package creates a file locally in the user's device more easily.

Requirments for All OS (Operating System)


  • Python should be Installed
  • PIP should also be Installed

What is PIP?


Pip is a package manager for Python that allows you to install additional libraries and packages that are not part of the standard Python library, such as the ones found in the Python Package Index.

Examples


Here is an example of this Python module:

import LocalDataStorage as m

obj = m.LocalDataStore("py")
obj.save_data("example")

Output:

example.py

As shown in the above code, py is used as filetype, and example is used as filename.

Documentation


there are four methods in this package:

  1. save_data: It creates a new file but cannot upload the data inside that file and throws an error when the file already exists. There is a single attribute for this method filename.

  2. load_data: It opens a pre-made file; if the file doesn't exist, it throws an error and returns the data written in that file if everything is fine. There is a single attribute for this method filename.

  3. update_data: It opens a pre-made file and updates the text in that file and if the file doesn't exist, it throws an error. There are two attributes for this method: filename and value.

  4. delete_data: It opens a pre-made file and deletes it and if the file doesn't exist, it throws an error. There is a single attribute for this method filename.

More Examples


There is another example in front of you that shows the workings of the whole package:

import LocalDataStorage as m

obj = m.LocalDataStore("txt")

value = input("Enter something:")
obj.update_data("example2", value)
print("You Wrote:", obj.load_data("example2"))

Output:

Enter something:hello world
You Wrote: hello world

As we can see the update_data() method can also be used to create a file if it doesn't exist and give values.

Be a Member


You can become a member by reporting bugs or faults you find in this package, we will do our best to solve that bug and make this package comfortable for you.

License


there is MIT LICENCE for this package

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

LocalDataStorage-0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

LocalDataStorage-0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file LocalDataStorage-0.1.tar.gz.

File metadata

  • Download URL: LocalDataStorage-0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for LocalDataStorage-0.1.tar.gz
Algorithm Hash digest
SHA256 b5a0b0c2b7fda0284c4aae822aeb64c6855a4a094357c189c6ce348c00b1a10c
MD5 23525e04ce207189a8641adbb8d5e743
BLAKE2b-256 7c2d7755518034532fdcc30dea2ac74d86e0e4ea05ef1373b7dd25a6ce983bd4

See more details on using hashes here.

File details

Details for the file LocalDataStorage-0.1-py3-none-any.whl.

File metadata

  • Download URL: LocalDataStorage-0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.5

File hashes

Hashes for LocalDataStorage-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 04563b1da2efe51ef28f4a7f4d8b6965028c392ac29b20f15cf99b34a1fc1503
MD5 64aa97983407f344987cfe662999de7b
BLAKE2b-256 1dc6c91294d984f5ef945a4705f281e57243ebb637a164322b73d03af65d97d6

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