Registry / serialization / reuters-style

reuters-style

JSON →
library0.0.5pypypi✓ verified 82d ago

Format dates, numbers and text to conform with the Reuters Style Guide. Current version is 0.0.5, released in 2024. Release cadence is irregular.

pip install reuters-style
INSTALL
IMPORT
SIG · REUTERS-STYLE
R
reuters-style
serializationpythonv0.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RIC
from reuters_style import RIC
from reuters_style import ReutersStyle
Slug
from reuters_style import Slug
from reuters_style import ReutersStyle
validate_slug
from reuters_style import validate_slug
from reuters_style import ReutersStyle

Basic usage: create a ReutersStyle instance and call format methods.

from reuters_style import ReutersStyle # Format a date style = ReutersStyle() print(style.format_date('2024-01-01')) # Output: 'Jan 1' # Format a number print(style.format_number(1234567)) # Output: '1,234,567' # Format text print(style.format_text('Mr. John Smith')) # Output: 'John Smith'
Debug
Known issues
gotchaThe package import uses underscores (reuters_style) not hyphens.
fix
Use `import reuters_style` or `from reuters_style import ...`
affects: all
deprecatedSome functionality may be removed in future versions without prior notice. The package is in early development (pre-1.0).
fix
Pin to a specific version and review changelogs before upgrading.
affects: 0.x
gotchaThe ReutersStyle class caches some data; creating a new instance per request may be inefficient.
fix
Reuse the same instance when possible.
affects: all
Upgrade
Version history
0.0.5latest on PyPI · released Nov 2, 2023
Audit
Dependencies
dateparserrequiredUsed for parsing dates
Agent activity
4 hits · last 30 days
node
4
Resources
reuters-style — pip install reuters-style · libregistry