code

import random
import string
import cherrypy

class StringGenerator(object):
    @cherrypy.expose
    def index(self):
        return "Hello world!"

    @cherrypy.expose
    def generate(self):
        return ''.join(random.sample(string.hexdigits, 8))


if __name__ == '__main__':
    cherrypy.quickstart(StringGenerator())

 

 

 

 

 

 

 

 

相关文章:

  • 2022-12-23
  • 2021-07-26
  • 2021-09-25
  • 2022-12-23
  • 2021-11-17
  • 2021-05-16
  • 2021-10-23
  • 2022-12-23
猜你喜欢
  • 2021-07-01
  • 2021-11-11
  • 2021-11-10
  • 2021-11-04
  • 2022-02-19
相关资源
相似解决方案