Skip to main content

Middleman Python API Configuration

There's a time and place for everything, maybe not now.

This guide supposes that you have already followed the Setting Up Your Environment guide. If you haven't done so, please refer to the Setting Up Your Environment guide before proceeding. You should also have followed: Setting up enviorment for Middleman

Project Repository

Getting Access to the Repository

The Middleman project is hosted on GitHub at: https://github.com/TravellingLanguages/middleman

Repository Access

If you cannot access the repository:

  • Contact Sean to be added to the GitHub organization
  • Request invitation to the TravellingLanguages GitHub repository

Locating Project Files

Identifying Your Project Folder

  1. Navigate to the folder where you've saved the Middleman project
  2. This location will be referenced as $MIDDLEMAN_BASE_FOLDER$
  3. Ensure you have the complete project files downloaded

Credential Configuration

Understanding the Configuration File

The project requires YetiForce API credentials to be configured in a specific format. These credentials will be added to a configuration file to enable API interactions.

Editing Credentials

Open the configuration file (yetiforce_credentials.ini) and replace the placeholders with your specific values:

[YetiForce]
# Base URL of the YetiForce API instance
base_url = https://example.yetiforce.com

# API Key Credentials
api_key_username = $APPLICATION_NAME$
api_key_password = $APPLICATION_PASSWORD$

# X-API-Key for additional security
x_api_key = $APPLICATION_KEY$

# API User Credentials
api_user_email = $DATABASE_USER_MAIL$
api_user_password = $APPLICATION_PASSWORD$
Credential Replacement
  • Replace $APPLICATION_NAME$ with your Web Services Application name
  • Replace $APPLICATION_PASSWORD$ with the chosen password
  • Replace $APPLICATION_KEY$ with the copied application key
  • Replace $DATABASE_USER_MAIL$ with the email of the created web service user
  • Ensure https://example.yetiforce.com is replaced with your actual YetiForce instance URL to get it just go to your yetifoce login page then your url will be like https://anylogin.page.yours/index.php and the instance url will be this without /index.php so just https://anylogin.page.yours

Environment Setup

Referencing Additional Setup Documentation

For comprehensive environment setup instructions, refer to the documentation in the "Setting up your environment" and "Middleman Env Setup" folders within the project repository.

Best Practices and Security Considerations

Credential Security
  • Keep your credentials confidential
  • Do not share the configuration file publicly
  • Consider using environment-specific configuration management

Verification Steps

Checking Configuration

After setting up your credentials:

  1. Verify the base URL is correct
  2. Confirm all placeholder values have been replaced
  3. Ensure no typos in email addresses or keys
  4. Check that passwords match those set in YetiForce

Troubleshooting

Common Configuration Issues

  • Incorrect base URL
  • Mismatched credentials
  • Network connectivity problems with YetiForce instance
Troubleshooting

If you encounter authentication errors:

  • Double-check all credentials
  • Verify network connectivity
  • Confirm user permissions in YetiForce
  • Check API service status

Next Steps

  • Complete environment setup as per project documentation
  • Test API connectivity
  • Integrate with your specific use case