Unofficial python library for interacting with CUNY web services (Brightspace, ScheduleBuilder, CUNYfirst Home).
import asyncio
from cuny.client import AsyncCUNYClient
async def main():
# Login with credentials
client = await AsyncCUNYClient.login_with_username_and_password(
"your_username",
"your_password",
"your_2fa_code"
)
async with client:
# Example: Enumerate enrollments
enrollments = await client.brightspace.get_my_enrollments()
for enrollment in enrollments:
print(f"{enrollment.OrgUnit.Name} ({enrollment.OrgUnit.Code})")
if __name__ == "__main__":
asyncio.run(main())- Update documentation
- Add examples
- Add tests
- Content
- Assignments
- Grades
- Transcripts
- Personal Info
- Course History
- This project is not affiliated with or endorsed by the City University of New York (CUNY).
- Use this software responsibly and in accordance with CUNY policies, terms of service, and all applicable laws and regulations.
- Do not use this library to access, collect, or distribute confidential, personal, or restricted information without explicit authorization.
- The maintainers assume no liability for misuse; use this software at your own risk.