Skip to main content

No project description provided

Project description

pyfvp

pyvfp is a pyhon library for interacting with Visual Fox Pro databases using the oledbvfp driver on 64-bit platforms.

It leverages a c++ 32bit binary to execute and returns queries in text format. Selects are returned with the associated data types and coerced into valid python types via pandas.

Both the executable and source are included in the package, and the binary file graciously handles errors so no table locks should be encountered. All queries are run NON exclusively.

Installation

pip install pyvfp

Usage

Selecting data

To select data, use the select method. This will return a pandas dataframe with the data types coerced to valid python types. There are also optional kwargs to return the data as a list of dicts, or a list of lists, etc.

from pyvfp import Vfp

vfp = Vfp("C:/path/to/your/dbc/my_dbc.DBC")
df = vfp.select("select * from my_table")

You can then save, or manipulate the data to your will.

df.to_csv("my_table.xlsx")
df.to_excel("my_table.xlsx")

Updating, Inserting and Deleting

To update, delete or insert, use the execute method. This will return a boolean True, if successful for raise and exception.

from pyvfp import Vfp

vfp = Vfp("C:/path/to/your/dbc/my_dbc.DBC")
vfp.execute("update my_table set my_field = 'my_value' where my_field = 'my_other_value'")

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

pyvfp-0.1.2.tar.gz (46.4 kB view details)

Uploaded Source

Built Distribution

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

pyvfp-0.1.2-py3-none-any.whl (45.8 kB view details)

Uploaded Python 3

File details

Details for the file pyvfp-0.1.2.tar.gz.

File metadata

  • Download URL: pyvfp-0.1.2.tar.gz
  • Upload date:
  • Size: 46.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.12.3

File hashes

Hashes for pyvfp-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c10348f15c840679b662fa374bbc0ea82309e5c931bd8f589bb7ceb0e3d74368
MD5 b9cbba5a0bf3375bde3d9fae699bfd60
BLAKE2b-256 75248c06d228b9486126d469b0c984effd431fb18ee3b79a73261ad2f9c4a6b0

See more details on using hashes here.

File details

Details for the file pyvfp-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pyvfp-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 45.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pyvfp-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 276c6380efc60503dedc8677f363cba5d827ceaa74e23dca29f05a7d618a9000
MD5 25567ca771985c9bd763af011ec41fdb
BLAKE2b-256 cbeb29999ca33b8f3db03b19cf5fdd960863e57dc704f1c20435a89d47fc0595

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