You can just format with high precision and cut the string to the desired number of characters (Python 3):
f"{value:.6f}"[:8]
Note that it doesn't handle overflow well; in this case numbers that require more than 8 digits.