Get the latest Blender, older versions, or experimental builds.
Stay up-to-date with the new features in the latest Blender releases.
Access production assets and knowledge from the open movies.
Documentation on the usage and features in Blender.
Latest development updates, by Blender developers.
Guidelines, release notes and development docs.
A platform to collect and share results of the Blender Benchmark.
The yearly event that brings the community together.
Support core development with a monthly contribution.
Perform a single donation with more payment options available.
from .client import CommunicationError
def submit_benchmark(benchmark_data: dict):
"""Submit benchmark data to MyData.
Authenticates the user via the web browser and Blender ID if necessary.
Authentication tokens are stored on disk and validated before reusing.
"""
import logging
import os
from .client import BenchmarkClient
mydata_url = os.environ.get('MYDATA') or 'https://mydata.blender.org/'
if 'MYDATA' in os.environ:
# Assume we're debugging here.
logging.basicConfig(level=logging.DEBUG,
format='%(asctime)-15s %(levelname)8s %(name)s %(message)s')
bc = BenchmarkClient(mydata_url)
# Make sure we have a token; can start the browser to get one.
token = bc.load_auth_token()
result = bc.submit_benchmark(benchmark_data)
print(result)
# If we get a location from the MyData server, show it in a browser.
if result.location:
import webbrowser
webbrowser.open_new_tab(result.location)