Browse Source
			
			
			Merge pull request #365 from ouattararomuald/update-readme-issue-344
			
				Add changing realm example
			
			
				pull/366/head
			
			
		 
		
			
				
					
						 Richard Nemeth
					
					3 years ago
						Richard Nemeth
					
					3 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
				  
				  No known key found for this signature in database
				  
				  	
						GPG Key ID: 4AEE18F83AFDEB23
				  	
				  
				
			
		
		
		
	
		
			
				 1 changed files with 
6 additions and 
0 deletions
			 
			
		 
		
			
				- 
					
					
					 
					README.md
				
					
					
						
							
								
									
										
											
	
		
			
				
					|  |  | @ -319,4 +319,10 @@ idps = keycloak_admin.get_idps() | 
			
		
	
		
			
				
					|  |  |  | # Create a new Realm | 
			
		
	
		
			
				
					|  |  |  | keycloak_admin.create_realm(payload={"realm": "demo"}, skip_exists=False) | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | # Changing Realm | 
			
		
	
		
			
				
					|  |  |  | keycloak_admin = KeycloakAdmin(realm_name="main", ...) | 
			
		
	
		
			
				
					|  |  |  | keycloak_admin.get_users() # Get user in main realm | 
			
		
	
		
			
				
					|  |  |  | keycloak_admin.realm_name = "demo" # Change realm to 'demo' | 
			
		
	
		
			
				
					|  |  |  | keycloak_admin.get_users() # Get users in realm 'demo' | 
			
		
	
		
			
				
					|  |  |  | keycloak_admin.create_user(...) # Creates a new user in 'demo' | 
			
		
	
		
			
				
					|  |  |  | ``` |