Skip to main content

Django APIs for physics conversion and calculations

Project description

djangophysics

Django APIs for Physics

Countries

List of countries according to ISO-3166 and details of a country based on PyCountry module.

Currencies

List of currencies based on ISO-4217

Currencies conversion rates

List of conversion rates fetched from BCE APIs. The module provides a command line for fetching rates from different services. Custom services can be added. Custom conversion rates can be created by registered users.

Systems and Units

List of unit systems, dimensions, and units based on the excellent Pint library. Custom units can be created by registered users.

Conversions

Conversions between currencies, with batch conversion support. Conversions between units in a unit system with batch conversion support

Evaluation

Check the syntax and dimension of a formula with units, and evaluate its value

Install

pip install djangophysics

Docker

docker is available at fmeurou/djangophysics

Usage

Routes

This package provides a OpenAPI documentation. See urls.example.py for a setup example.

Authentication

The app provides most services without authentication. Authentication is required to store custom conversion rates and custom conversion units. By default, the app is configured to allow authentication through an API token that can be generated for a user on the Django admin site.

API authentication can be achieved with an Authorization header with value Token curl -H "Authorization: Token ".

Language support

The app supports translations for countries and units in 15 languages. More languages should be available soon.

Fetch rates

The app uses python-forex as a mecanism to fetch currency rates. A django command is available to fetch rates from command line : $ ./manage.py fetch_rates

About

Project goals

Geophysics aims at bringing physical quantities to Web Services.

Project website

A live version of this service is available at https://api.geophysics.io.

Mentions

This module relies on the great work from the following projects:

Leadership

This project is maintained by Frédéric Meurou fm@peabytes.me.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

djangophysics-1.2.1.tar.gz (270.9 kB view details)

Uploaded Source

Built Distribution

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

djangophysics-1.2.1-py3-none-any.whl (353.6 kB view details)

Uploaded Python 3

File details

Details for the file djangophysics-1.2.1.tar.gz.

File metadata

  • Download URL: djangophysics-1.2.1.tar.gz
  • Upload date:
  • Size: 270.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for djangophysics-1.2.1.tar.gz
Algorithm Hash digest
SHA256 69360dfc7a52ffa5f3fdd16fb7eaff5613805fc9d2d34f5d0207856667166102
MD5 c4bab13216db03c41a2c148a15bd0c9f
BLAKE2b-256 0031e19f9c627652a96484e335c8572f3740950ab64a6ed363cd440722ed8659

See more details on using hashes here.

File details

Details for the file djangophysics-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: djangophysics-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 353.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for djangophysics-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 44793e4d707aded2d988ffd864250fc75b8ddc5f9f386320f7866848b1954177
MD5 4c58606d01eb8c19e14e2284a2041c30
BLAKE2b-256 9825c91afbd59aafab9f4aa50eed584818a1aaf4d97f4154b64efbf07eff6762

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