Back to PyPI: https://pypi.org/project/degrees/
Introduction
Class
Degree
Functions
degree2radius
radius2degree
convert_to_360
Changelog
A python lib for degree calculations and conversions
Creating a Degree object
>>> degrees.Degree(1)
1°
>>> degrees.Degree(2, 3, 4)
2°3'4"
>>> degrees.Degree(1, second=2)
1°0'2"
>>> degrees.Degree(1, 3)
1°3'
>>> degrees.Degree(0, -1)
-1'
>>> degrees.Degree(2, -4)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
degrees.Degree(2, -4)
~~~~~~^^^^^^
File "/degrees.py", line 32, in __init__
raise ValueError("if degree is not 0, minute and second must be positive integer")
ValueError: if degree is not 0, minute and second must be positive integer

Return a degree object from a string.
Return a degree object from an iterable.
The total seconds of a degree object.
The degree of a degree object(without sign).
The minute of a degree object(without sign).
The second of a degree object(without sign).
The sign of a degree object.
Note
The attributes of Degree are read-only.
Convert angle x from a degree object to radians.
Convert angle x from radians to a degree object.
Be using for angle normalization.
The degree version info(it is like sys.version_info).
Simplified class _Type(for type annotation), you can use it on Python 3.8+(in the previous version, it only supports Python 3.12+).
Rewrite the method Degree.__hash__. Now it can execute perfectly.
Added methods: Degree.from_string, Degree.from_iter, property Degree.total_seconds.
Added Degree.deg, Degree.min and Degree.sec in the document.
Yanked Degree 0.1.0.
Moved the documentation to Bilibili.
If you found the bug in the code, you can email me at snake830@vip.163.com. I'm happy to receive the advice!