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 details)

Uploaded Python 3

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 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