Skip to main content

A CLI-based personal library manager

Project description

def save_books_to_file(connection, file_path="library.txt"): try: cursor= connection.cursor() query= "SELECT * FROM Books" cursor.execute(query) results= cursor.fetchall() cursor.close()

    with open(file_path, "w") as file:
        for row in results:
            file.write(f"{row}\n")

    print(f"Books data saved to {file_path}")
except Error as e:
    print(f"Failed to save books to file: {e}")

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

personal_library_managing_system-0.2.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file personal_library_managing_system-0.2.1.tar.gz.

File metadata

File hashes

Hashes for personal_library_managing_system-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9eeb7b302c39c73086d0aab240e864f5e2c77561a7cf4cd4c9f7ddd81b5f3798
MD5 e02ac7cf00bd9a8870dce81252f5de69
BLAKE2b-256 1635fbefcdbfa66ec53bb30cb9f3bb51e8b35d7aeacc3bd353598125e6e7f53a

See more details on using hashes here.

File details

Details for the file personal_library_managing_system-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for personal_library_managing_system-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 547a7402ceeb08d8a47d5f611e3939281d991f060e2494cb8a4d847427e97782
MD5 d70482787006b5f3a5de3fc4ade5728f
BLAKE2b-256 79542f4fa046421143aced79b1f9431f085244e905f94c9a78b504b49d5fb8bb

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