Skip to main content

PerDiem

A library that allows a user to get the per diem rates for a location and calculate the per diem rates for a given period of time. It takes the data from GSA's per diem page and the computer handles the rest!

Usage

from perdiem import PerDiem

# Look up the rates for Washington, DC (accept the first result)
rates = PerDiem.get_rates("Washington, DC")[0]

# Alternatively, look up the rates by zip code!
# rates = PerDiem.get_rates("20002")[0]

start_date = "2024-01-01"
end_date = "2024-01-08"

# Calculate the total costs for a trip
trip = PerDiem.calculate_per_diem(rates, start_date, end_date)
print(trip["total"])
# 2136.5

Install

pip install perdiem

Features

  • Look up Per Diem rate by Zip Code
  • Compute the total (factoring first and last day travel reductions)

Future?

  • [] An API?
  • [] A CLI?
  • [] Export to Excel?

License

Apache 2.0

Metadata

Release files for perdiem 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for perdiem 0.1.2
File Size Uploaded Provenance
perdiem-0.1.2.tar.gz 580.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for perdiem 0.1.2
File Interpreter ABI Platform
perdiem-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / perdiem-0.1.2.tar.gz

Download URL perdiem-0.1.2.tar.gz
Size 580.7 kB
Tags Source
SHA-256 checksum
How to use checksums
03a51e4cd02ae53c690779f18cf9b5ee3a8df9e381ed3beda1c461f87becd915
BLAKE2b-256 checksum
How to use checksums
9d64601f14db2843807cc54e2ef90dbd587860989b002ebfd1ee8ae54ac9ca69
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.3.0

Release files / perdiem-0.1.2-py3-none-any.whl

Download URL perdiem-0.1.2-py3-none-any.whl
Size 595.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
58abb72f9301c4b2abdaef2594b55138fac82f7f2fba867930e04c5140b5d1e7
BLAKE2b-256 checksum
How to use checksums
d8571eb17738e2b9fd1c6d37f6a06cd7ca7b4d21da7ecd4a9537441b50819c59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.12.1 Darwin/23.3.0

Security for perdiem 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page