Skip to content
Snippets Groups Projects

ecmind_blue_client: xml_import() example (just metadata)

  • Clone with SSH
  • Clone with HTTPS
  • Embed
  • Share
    The snippet can be accessed without any authentication.
    Authored by Roland Koller
    Edited
    xml_import.py 609 B
    from ecmind_blue_client.tcp_client import TcpClient as Client
    import os 
    from faker import Faker
    
    client = Client(
        hostname='enaio-devel-5',
        port=4000, 
        appname=os.path.basename(__file__),
        username='root',
        password='optimal',
        use_ssl=False
    )
    
    fake = Faker()
    for _ in range(100000):
        import_result = client.xml_import(
            object_name='Test',
            search_fields={},
            import_fields={
                'Name': fake.last_name(),
                'Vorname': fake.first_name(),
                'Alter': str(fake.pyint(min_value=18, max_value=80))
            }
        )
        print(import_result)
    0% Loading or .
    You are about to add 0 people to the discussion. Proceed with caution.
    Finish editing this message first!
    Please register or to comment