python으로 GUID 만들기

 

python 2.5이상부터 uuid 모듈을 표준으로 인정했습니다.

python3을 기준으로 해석해보면 대략

1. uuid.uuid1(node=None, clock_seq=None)

Generate a UUID from a host ID, sequence number, and the current time. If node is not given, getnode() is used to obtain the hardware address. If clock_seq is given, it is used as the sequence number; otherwise a random 14-bit sequence number is chosen.

host ID, sequence number, 현재 시간을 기준으로 UUID를 생성합니다. node가 주어지지 않을 경우에는 getnode()로 하드웨어의 주소를 얻습니다. clock_seq가 주어진 경우 clock_seq를 sequence number로 쓰고 그렇지 않은 경우는 랜덤 14-bit을 만들어냅니다

2. uuid.uuid3(namespace, name)

Generate a UUID based on the MD5 hash of a namespace identifier (which is a UUID) and a name (which is a string).

namespace 식별자의 MD5와 name을 기준으로 UUID를 생성합니다.

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

3. uuid.uuid4()

Generate a random UUID.

랜덤 UUID를 생성합니다

4. uuid.uuid5(namespace, name)

Generate a UUID based on the SHA-1 hash of a namespace identifier (which is a UUID) and a name (which is a string).

namespace 식별자의 SHA-1 해시와 name을 기준으로 UUID를 생성합니다.

사용 예 :

>>> import uuid
>>> uuid.uuid4()
UUID('5361a11b-615c-42bf-9bdb-e2c3790ada14')
[출처] https://hashcode.co.kr/questions/949/python%EC%9C%BC%EB%A1%9C-guid-%EB%A7%8C%EB%93%A4%EA%B8%B0

 

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
62 PS4 프로 자동 구입 매크로 만들기 -2- file 졸리운_곰 2020.11.21 512
61 PS4 프로 자동 구입 매크로 만들기 -1- file 졸리운_곰 2020.11.21 517
60 Zappa를 이용해 AWS Lambda에 Flask 올리기 file 졸리운_곰 2020.10.25 455
59 Python WAS 구축하기 ( Django, Nginx, Gunicorn ) file 졸리운_곰 2020.10.25 430
58 Python SimpleHTTPServer file 졸리운_곰 2020.10.25 421
57 [Django] 설문조사 애플리케이션 예제 (3) - 구현하기 file 졸리운_곰 2020.09.07 591
56 [Django] 설문조사 애플리케이션 예제 (2) - Model 다루기 file 졸리운_곰 2020.09.07 503
55 ????[Django] 설문조사 애플리케이션 예제 (1) - Django 프로젝트 구조 알아보기???? file 졸리운_곰 2020.09.07 409
54 [Python 데이터 수집] 웹 페이지 컨텐츠 수집 file 졸리운_곰 2020.08.08 468
53 파이썬 네이버 실시간 검색어 스크래핑(크롤링) file 졸리운_곰 2020.05.09 469
52 파이썬 크롤링 스크래핑 간단 설명(예제) file 졸리운_곰 2020.05.09 577
51 Web Screen Scraping with Python to Populate SQL Server Tables file 졸리운_곰 2020.02.27 469
50 [네이버 뉴스 스크래핑/크롤링] NNST - 한국어 네이버 뉴스 데이터셋 file 졸리운_곰 2020.01.21 434
49 네이버 뉴스 크롤러 github naver_news_crawling_perfect.py 졸리운_곰 2020.01.19 633
48 Getting Started with Web Automation Testing using Selenium and Python 졸리운_곰 2019.12.25 365
47 Apache와 Python을 CGI로 연동하기 file 졸리운_곰 2019.10.24 384
46 파이썬 구현의 blog API : MetaWeblog API (MWA) implemented in Python file 졸리운_곰 2019.02.08 438
45 아파치서버와 파이썬 연동 - 웹에서 파이썬실행 졸리운_곰 2019.01.03 1258
44 Python Django 프로젝트를 위한 Jenkins 설정 : Assembling a Continuous Integration Service for a Django project on Jenkins file 졸리운_곰 2018.11.03 1348
43 Django + djangorestframework + django_rest_swagger 시작 file 졸리운_곰 2018.05.27 430
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED