Skip to main content

This python module is a translation and implementation of the Astro::MoonPhase Perl module via the Ruby implementation. You can use this module to determine the occurrence of the next full moon or to determine if a given date is/was/will be a full moon.

Installation

Add this line to your application’s Gemfile:

pip install fullmoon

Usage

Two classes can be called. One determines the next full moon. The other determines if a given date is a full moon or not.

from fullmoon import NextFullMoon
from fullmoon import IsFullMoon

###################################
#   Next Full Moon Examples
###################################

n = NextFullMoon()

# Iterate through all next full moon from "now"
print(n.next_full_moon())
print(n.next_full_moon())

# Restart from "now"
print(n.reset().next_full_moon())
print(n.next_full_moon())

# Change the origin to 1998-07-12
print(n.set_origin_date_string('1998-07-12').next_full_moon()) # PRINT: 1998-08-07
print(n.next_full_moon()) # PRINT: 1998-09-06

# Reset the origin to 1998-07-12
n.reset()
print(n.next_full_moon()) # PRINT: 1998-08-07

# Reset the origin to "now"
print(n.set_origin_now().next_full_moon())


###################################
#   Is Full Moon Examples
###################################

i = IsFullMoon()

# Check if "now" if full moon
print(i.is_full_moon())

# Check if "1998-07-12" is full moon
print(i.set_date_string('12/07/1992', '%d/%m/%Y').is_full_moon()) # PRINT: False

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/jr-k/fullmoon. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The module is available as open source under the terms of the MIT License.

Metadata

Release files for fullmoon 1.0.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 fullmoon 1.0.2
File Size Uploaded
fullmoon-1.0.2.tar.gz 6.0 kB Details

Built distribution (wheel)

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

Total release size: 13.3 kB

Release files / fullmoon-1.0.2.tar.gz

Download URL fullmoon-1.0.2.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
595cf49dad6ff37751a55d9b6599d1ecbe200e6d8ac113faea1eb11f6e17bf86
BLAKE2b-256 checksum
How to use checksums
cdfca5794b83e77dd37f24e6d77f322bf9a8c017c165af50811ce40a9914dbab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.5

Release files / fullmoon-1.0.2-py3-none-any.whl

Download URL fullmoon-1.0.2-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9730dc9eebb151605887e611e16fba3e386cd242da81ce60a8e8ccfa426dfb4
BLAKE2b-256 checksum
How to use checksums
815a538d906a9cb3a0ef1bade173fc1dcbe2559cd0ccda4d956c9b5a23b47644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.5

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

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