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 Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

Uploaded Python 3

Supported by

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