Pushing the .ttl file from a project in IDE to Stardog Cloud Database

Hey Stardog team,
I am working on a Python project, and I have the .ttl file. I wish to push that file to the database in Stardog Studio. I am using this approach
if DB_NAME not in [db.name for db in admin.databases()]:
admin.new_database(DB_NAME, options={}, contents=[stardog.content.File('songs.ttl')])
else:
with stardog.Connection(DB_NAME, endpoint=ENDPOINT, username=USERNAME, password=PASSWORD) as conn:
conn.begin()
conn.add(stardog.content.File('songs.ttl'))
conn.commit()

Here, the username and the password are the same as that I use for Stardog Cloud login. The endpoint is the one which we get with the free tier. I keep getting 401 Unauthorized. Can someone help me with where I am going wrong?

I would also love to know how to automate this for Support Stardog · Issue #17 · WolfgangFahl/pyomnigraph · GitHub