[Python] How do i get data from immutableMultiDict

Discussão em 'Python' iniciado por Stack, Abril 19, 2025.

  1. Stack

    Stack Membro Participativo

    I would like to understand how can i send a list over a request and get in python. I tried using request.args.get('keywords') which didnt help. Then when i tried request.args, i got

    ImmutableMultiDict([('keywords[]', 'divyani'), ('keywords[]', 'object'), ('keywords[]', 'work')])


    What i have tried is

    Call :

    var promise = $http({
    method: 'GET',
    url: 'http://127.0.0.1:5000/' + 'api/v1/resume-anotate/' + url,
    params: {
    "keywords[]": ['divyani', 'object', 'work']
    }
    }).then(function (response) {
    return response.data;
    }, function (error) {
    return error.data;
    });


    Request URL :

    http://127.0.0.1:5000/api/v1/resume-anotate/file?keywords%5B%5D=divyani&keywords%5B%5D=object&keywords%5B%5D=work


    Getting Args:

    request.args

    ImmutableMultiDict([('keywords[]', 'divyani'), ('keywords[]', 'object'), ('keywords[]', 'work')])

    Continue reading...

Compartilhe esta Página