Skip to main content

memberjojo - tools for working with members.

Project description

memberjojo

memberjojo is a Python library for managing Membermojo data from CSV imports.
It provides member database interactions, and transaction querying.
This is done in a local SQLite database, and does not alter anything on Membermojo.
It provides tools to load, and query membership and transaction data efficiently without having to use SQLite directly.
When importing CSV files existing entries are skipped, so you can just import the latest download and the local database is updated with new entries.
All the transaction data is imported into the database, but currently only a limited amount of member data is imported.


Installation

Install via pip:

pip install memberjojo

Or clone the repo and install locally with flit:

git clone https://github.com/a16bitsysop/memberjojo.git
cd memberjojo
flit install --symlink

Usage

Example loading members and using Member objects:

from pathlib import Path
from membermojo import Member

# database is created if it does not exist
member_database_path = Path(Path(__file__).parent, "database", "my-members.db")
member_csv_path = Path("download", "members.csv")

members = Member(member_database_path)
members.import_csv(member_csv_path)

for member in members:
    print(member.first_name, member.last_name, member.member_num)

# Get full name for a given member number
found_name = members.get_name(1)
if found_name:
    print(f"Member with id of 1 is {found_name}")
else:
    print("Member 1 does not exist")

Documentation

Full documentation is available at
👉 https://a16bitsysop.github.io/memberjojo/


Running Tests

Run tests:

pytest

Contributing

Contributions are welcome! Please:

  1. Fork the repo
  2. Create your feature branch git checkout -b my-feature
  3. Edit the source code to add and test your changes
  4. Commit your changes git commit -m 'Add some feature'
  5. Push to your branch git push origin my-feature
  6. Open a Pull Request

Please follow the existing code style and write tests for new features.


License

This project is licensed under the MIT MIT License.


Contact

Created and maintained by Duncan Bellamy. Feel free to open issues or reach out on GitHub.


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

memberjojo-1.1.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

memberjojo-1.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file memberjojo-1.1.tar.gz.

File metadata

  • Download URL: memberjojo-1.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for memberjojo-1.1.tar.gz
Algorithm Hash digest
SHA256 36aa66348c38d3ee9cb040b53b5412165f3523dee8dfe9c699dcc80190fb0cd7
MD5 df4d3cfd758fe4c0a98ec0adae89a2e4
BLAKE2b-256 2e5f7cf20498fb98460d5b6ba03d1346bed92972ead887078f872e6630c8df66

See more details on using hashes here.

Provenance

The following attestation bundles were made for memberjojo-1.1.tar.gz:

Publisher: publish.yaml on a16bitsysop/memberjojo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file memberjojo-1.1-py3-none-any.whl.

File metadata

  • Download URL: memberjojo-1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for memberjojo-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cbd6b08d55ddf53905f1d64ff82137b0d161e8a8f27acdc322b1f90be703d7ea
MD5 6ed007eb4faa8445e3d4d99af33aea45
BLAKE2b-256 02ad9948ca018bded11d2258c71781f9ef2de83d1f9db43bbb79c094916d4b82

See more details on using hashes here.

Provenance

The following attestation bundles were made for memberjojo-1.1-py3-none-any.whl:

Publisher: publish.yaml on a16bitsysop/memberjojo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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